-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0: pytest is failing in tests/runners.py units #933
Comments
@kloczek This is not an issue. Use the
|
Just tested that and .. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -s tests/runners.py
============================= test session starts ==============================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/invoke-2.0.0
configfile: pytest.ini
plugins: relaxed-2.0.0
collected 188 items
tests/runners.py ....sphinx-autoapi
........................................s...........................................s.....................................................FFFFFs.FFFFFF.FF.F..F.........................
=================================== FAILURES ===================================
_____________ Local_.pty.when_pty_True_we_use_pty_fork_and_os_exec _____________
self = <runners.Local_.pty object at 0x7f47e75d8e50>
@mock_pty()
def when_pty_True_we_use_pty_fork_and_os_exec(self):
"when pty=True, we use pty.fork and os.exec*"
> self._run(_, pty=True)
tests/runners.py:1543:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946769201136'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_________________ Local_.pty.pty_uses_WEXITSTATUS_if_WIFEXITED _________________
self = <runners.Local_.pty object at 0x7f47e75d8160>
def pty_uses_WEXITSTATUS_if_WIFEXITED(self):
> self._expect_exit_check(True)
tests/runners.py:1566:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/mock.py:1325: in patched
return func(*newargs, **newkeywargs)
tests/_util.py:239: in wrapper
f(*args, **kwargs)
tests/runners.py:1560: in _expect_exit_check
self._run(_, pty=True)
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946769520768'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_________________ Local_.pty.pty_uses_WTERMSIG_if_WIFSIGNALED __________________
self = <runners.Local_.pty object at 0x7f47e75d8070>
def pty_uses_WTERMSIG_if_WIFSIGNALED(self):
> self._expect_exit_check(False)
tests/runners.py:1569:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/mock.py:1325: in patched
return func(*newargs, **newkeywargs)
tests/_util.py:239: in wrapper
f(*args, **kwargs)
tests/runners.py:1560: in _expect_exit_check
self._run(_, pty=True)
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946761038144'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
________ Local_.pty.WTERMSIG_result_turned_negative_to_match_subprocess ________
self = <runners.Local_.pty object at 0x7f47e75d8490>
mock_os = <MagicMock name='os' id='139946761008080'>
@mock_pty(insert_os=True)
def WTERMSIG_result_turned_negative_to_match_subprocess(self, mock_os):
mock_os.WIFEXITED.return_value = False
mock_os.WIFSIGNALED.return_value = True
mock_os.WTERMSIG.return_value = 2
> assert self._run(_, pty=True, warn=True).exited == -2
tests/runners.py:1576:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946764478448'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
______________ Local_.pty.pty_is_set_to_controlling_terminal_size ______________
self = <runners.Local_.pty object at 0x7f47e7963520>
@mock_pty()
def pty_is_set_to_controlling_terminal_size(self):
> self._run(_, pty=True)
tests/runners.py:1580:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946797670992'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_______________ Local_.pty.spurious_OSErrors_handled_gracefully ________________
self = <runners.Local_.pty object at 0x7f47e7963dc0>
@mock_pty(trailing_error=OSError("Input/output error"))
def spurious_OSErrors_handled_gracefully(self):
# Doesn't-blow-up test.
> self._run(_, pty=True)
tests/runners.py:1600:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946769346672'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
____________ Local_.pty.other_spurious_OSErrors_handled_gracefully _____________
self = <runners.Local_.pty object at 0x7f47e7963a90>
@mock_pty(trailing_error=OSError("I/O error"))
def other_spurious_OSErrors_handled_gracefully(self):
# Doesn't-blow-up test.
> self._run(_, pty=True)
tests/runners.py:1605:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946808681616'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
__________________ Local_.pty.non_spurious_OSErrors_bubble_up __________________
self = <runners.Local_.pty object at 0x7f47e75d8430>
@mock_pty(trailing_error=OSError("wat"))
def non_spurious_OSErrors_bubble_up(self):
try:
> self._run(_, pty=True)
tests/runners.py:1610:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946759848480'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
__________________ Local_.pty.stop_mutes_errors_on_pty_close ___________________
self = <runners.Local_.pty object at 0x7f47e75d83d0>
@mock_pty(os_close_error=True)
def stop_mutes_errors_on_pty_close(self):
# Another doesn't-blow-up test, this time around os.close() of the
# pty itself (due to os_close_error=True)
> self._run(_, pty=True)
tests/runners.py:1620:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946807673712'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
________________ Local_.pty.fallback.can_be_overridden_by_kwarg ________________
self = <runners.Local_.pty.fallback object at 0x7f47e75d86d0>
@mock_pty(isatty=False)
def can_be_overridden_by_kwarg(self):
> self._run(_, pty=True, fallback=False)
tests/runners.py:1625:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946797717824'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_______________ Local_.pty.fallback.can_be_overridden_by_config ________________
self = <runners.Local_.pty.fallback object at 0x7f47e7c11370>
@mock_pty(isatty=False)
def can_be_overridden_by_config(self):
> self._runner(run={"fallback": False}).run(_, pty=True)
tests/runners.py:1631:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946797083280'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_______ Local_.pty.fallback.overridden_fallback_affects_result_pty_value _______
self = <runners.Local_.pty.fallback object at 0x7f47e7963b50>
@mock_pty(isatty=False)
def overridden_fallback_affects_result_pty_value(self):
> assert self._run(_, pty=True, fallback=False).pty is True
tests/runners.py:1642:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946797646512'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
____________ Local_.shell.defaults_to_bash_or_cmdexe_when_pty_True _____________
self = <runners.Local_.shell object at 0x7f47e7963970>
mock_os = <MagicMock name='os' id='139946769255152'>
@mock_pty(insert_os=True)
def defaults_to_bash_or_cmdexe_when_pty_True(self, mock_os):
# NOTE: yea, windows can't run pty is true, but this is really
# testing config behavior, so...meh
> self._run(_, pty=True)
tests/runners.py:1649:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946807266704'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_________________ Local_.shell.may_be_overridden_when_pty_True _________________
self = <runners.Local_.shell object at 0x7f47e7963730>
mock_os = <MagicMock name='os' id='139946760287712'>
@mock_pty(insert_os=True)
def may_be_overridden_when_pty_True(self, mock_os):
> self._run(_, pty=True, shell="/bin/zsh")
tests/runners.py:1661:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946768610736'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_____________________ Local_.env.uses_execve_for_pty_True ______________________
self = <runners.Local_.env object at 0x7f47e7963550>
mock_os = <MagicMock name='os' id='139946798189536'>
@mock_pty(insert_os=True)
def uses_execve_for_pty_True(self, mock_os):
type(mock_os).environ = {"OTHERVAR": "OTHERVAL"}
> self._run(_, pty=True, env={"FOO": "BAR"})
tests/runners.py:1683:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1534: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:376: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:421: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1272: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='139946797717056'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
=============================== warnings summary ===============================
../../../../../usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:172
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:172: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
exec(co, module.__dict__)
tests/runners.py::make_tcattrs
/usr/lib/python3.8/site-packages/_pytest/python.py:203: PytestReturnNotNoneWarning: Expected None, but tests/runners.py::make_tcattrs returned [None, None, None, -11, None, None, [None, None, None, None, None, 0, 1]], which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::displays_command_and_exit_code_by_default
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::displays_command_and_exit_code_by_default is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::does_not_display_stderr_when_pty_True
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::does_not_display_stderr_when_pty_True is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::pty_stderr_message_wins_over_hidden_stderr
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::pty_stderr_message_wins_over_hidden_stderr is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::explicit_hidden_stream_tail_display
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::explicit_hidden_stream_tail_display is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::displays_tails_of_streams_only_when_hidden
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::displays_tails_of_streams_only_when_hidden is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Result_::tail::returns_last_10_lines_of_given_stream_plus_whitespace
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Result_::tail::returns_last_10_lines_of_given_stream_plus_whitespace is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Result_::tail::line_count_is_configurable
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Result_::tail::line_count_is_configurable is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
tests/runners.py::Result_::tail::works_for_stderr_too
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:902: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/runners.py::Result_::tail::works_for_stderr_too is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================ |
What are the platform details? |
Linux x86/64. Package Version
----------------------------- -------
alabaster 0.7.13
asttokens 2.2.1
Babel 2.12.1
backcall 0.2.0
build 0.10.0
charset-normalizer 3.1.0
colorama 0.4.6
decorator 5.1.1
distro 1.8.0
docutils 0.19
exceptiongroup 1.1.1
executing 1.2.0
fluidity-sm 0.2.0
gpg 1.20.0
icecream 2.1.3
idna 3.4
imagesize 1.4.1
importlib-metadata 6.6.0
iniconfig 2.0.0
installer 0.7.0
ipython 8.12.0
jedi 0.18.2
Jinja2 3.1.2
lexicon 2.0.1
libcomps 0.1.19
MarkupSafe 2.1.2
matplotlib-inline 0.1.6
packaging 23.1
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pluggy 1.0.0
prompt-toolkit 3.0.38
ptyprocess 0.7.0
pure-eval 0.2.2
Pygments 2.15.1
pyproject_hooks 1.0.0
pytest 7.3.1
pytest-relaxed 2.0.0
python-dateutil 2.8.2
pytz 2023.2
PyYAML 6.0
requests 2.30.0
setuptools 67.7.2
six 1.16.0
snowballstemmer 2.2.0
Sphinx 6.2.1
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data 0.6.2
tomli 2.0.1
traitlets 5.9.0
typing_extensions 4.5.0
urllib3 1.26.15
wcwidth 0.2.6
wheel 0.40.0
zipp 3.15.0 |
Looks like pytest with 2.2.0 is OK now + /usr/bin/pytest -ra -m 'not network' -s
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/invoke-2.2.0
configfile: pytest.ini
testpaths: tests
plugins: relaxed-2.0.0
collected 979 items
tests/cli.py ......................
tests/collection.py ..........................................................................................
tests/completion.py .........................
tests/concurrency.py ......
tests/config.py ...................................................................................................................
tests/context.py .................................s.s..............................................
tests/executor.py .....................................
tests/init.py ............................
tests/loader.py ..............
tests/merge_dicts.py ............
tests/parser_argument.py ..................s...................
tests/parser_context.py .............................................
tests/parser_parser.py ............................................................
tests/program.py ...........................................................ss..............................................................
tests/runners.py ...........................................s...........................................s...........................................................s........................................
tests/task.py ......s.................................................................
tests/terminals.py ......ss
tests/util.py .......
tests/watchers.py .......
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/context.py:330: Skipped
SKIPPED [1] tests/context.py:350: Skipped
SKIPPED [1] tests/parser_argument.py:95: Skipped
SKIPPED [1] tests/program.py:536: Skipped
SKIPPED [1] tests/program.py:539: Skipped
SKIPPED [1] tests/runners.py:400: Skipped
SKIPPED [1] tests/runners.py:836: Skipped
SKIPPED [1] tests/runners.py:1594: Skipped
SKIPPED [1] tests/task.py:57: Skipped
SKIPPED [1] tests/terminals.py:75: Skipped
SKIPPED [1] tests/terminals.py:78: Skipped
============================================================================== 968 passed, 11 skipped in 7.00s ============================================================================== without |
That's great. Lmk if you find out the specific cause and I'll add regression tests. |
It look like it was kind of premature confirmation. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -s
============================= test session starts ==============================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/tkloczko/rpmbuild/BUILD/invoke-2.2.0
configfile: pytest.ini
testpaths: tests
plugins: relaxed-2.0.0
collected 979 items
tests/cli.py ......................
tests/collection.py ..........................................................................................
tests/completion.py .........................
tests/concurrency.py ......
tests/config.py ...................................................................................................................
tests/context.py .................................s.s..............................................
tests/executor.py .....................................
tests/init.py ............................
tests/loader.py ..............
tests/merge_dicts.py ............
tests/parser_argument.py ..................s...................
tests/parser_context.py .............................................
tests/parser_parser.py ............................................................
tests/program.py ...........................................................ss..............................................................
tests/runners.py ...........................................s...........................................s......................................................FFFFFs.FFFFFF.FF.F..F.........................
tests/task.py ......s.................................................................
tests/terminals.py ......ss
tests/util.py .......
tests/watchers.py .......
=================================== FAILURES ===================================
_____________ Local_.pty.when_pty_True_we_use_pty_fork_and_os_exec _____________
self = <runners.Local_.pty object at 0x7fcc879f2c70>
@mock_pty()
def when_pty_True_we_use_pty_fork_and_os_exec(self):
"when pty=True, we use pty.fork and os.exec*"
> self._run(_, pty=True)
tests/runners.py:1551:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516390340352'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_________________ Local_.pty.pty_uses_WEXITSTATUS_if_WIFEXITED _________________
self = <runners.Local_.pty object at 0x7fcc879f2dc0>
def pty_uses_WEXITSTATUS_if_WIFEXITED(self):
> self._expect_exit_check(True)
tests/runners.py:1574:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/mock.py:1325: in patched
return func(*newargs, **newkeywargs)
tests/_util.py:239: in wrapper
f(*args, **kwargs)
tests/runners.py:1568: in _expect_exit_check
self._run(_, pty=True)
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516387714480'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_________________ Local_.pty.pty_uses_WTERMSIG_if_WIFSIGNALED __________________
self = <runners.Local_.pty object at 0x7fcc879f2f10>
def pty_uses_WTERMSIG_if_WIFSIGNALED(self):
> self._expect_exit_check(False)
tests/runners.py:1577:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/mock.py:1325: in patched
return func(*newargs, **newkeywargs)
tests/_util.py:239: in wrapper
f(*args, **kwargs)
tests/runners.py:1568: in _expect_exit_check
self._run(_, pty=True)
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516431630976'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
________ Local_.pty.WTERMSIG_result_turned_negative_to_match_subprocess ________
self = <runners.Local_.pty object at 0x7fcc879f4070>
mock_os = <MagicMock name='os' id='140516422695040'>
@mock_pty(insert_os=True)
def WTERMSIG_result_turned_negative_to_match_subprocess(self, mock_os):
mock_os.WIFEXITED.return_value = False
mock_os.WIFSIGNALED.return_value = True
mock_os.WTERMSIG.return_value = 2
> assert self._run(_, pty=True, warn=True).exited == -2
tests/runners.py:1584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516428026208'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
______________ Local_.pty.pty_is_set_to_controlling_terminal_size ______________
self = <runners.Local_.pty object at 0x7fcc879f41c0>
@mock_pty()
def pty_is_set_to_controlling_terminal_size(self):
> self._run(_, pty=True)
tests/runners.py:1588:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516429393728'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_______________ Local_.pty.spurious_OSErrors_handled_gracefully ________________
self = <runners.Local_.pty object at 0x7fcc879f4580>
@mock_pty(trailing_error=OSError("Input/output error"))
def spurious_OSErrors_handled_gracefully(self):
# Doesn't-blow-up test.
> self._run(_, pty=True)
tests/runners.py:1608:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516384747824'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
____________ Local_.pty.other_spurious_OSErrors_handled_gracefully _____________
self = <runners.Local_.pty object at 0x7fcc879f46d0>
@mock_pty(trailing_error=OSError("I/O error"))
def other_spurious_OSErrors_handled_gracefully(self):
# Doesn't-blow-up test.
> self._run(_, pty=True)
tests/runners.py:1613:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516431668752'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
__________________ Local_.pty.non_spurious_OSErrors_bubble_up __________________
self = <runners.Local_.pty object at 0x7fcc879f4820>
@mock_pty(trailing_error=OSError("wat"))
def non_spurious_OSErrors_bubble_up(self):
try:
> self._run(_, pty=True)
tests/runners.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516387896960'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
__________________ Local_.pty.stop_mutes_errors_on_pty_close ___________________
self = <runners.Local_.pty object at 0x7fcc879f4970>
@mock_pty(os_close_error=True)
def stop_mutes_errors_on_pty_close(self):
# Another doesn't-blow-up test, this time around os.close() of the
# pty itself (due to os_close_error=True)
> self._run(_, pty=True)
tests/runners.py:1628:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516429534928'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
________________ Local_.pty.fallback.can_be_overridden_by_kwarg ________________
self = <runners.Local_.pty.fallback object at 0x7fcc879f4c40>
@mock_pty(isatty=False)
def can_be_overridden_by_kwarg(self):
> self._run(_, pty=True, fallback=False)
tests/runners.py:1633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516380020592'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_______________ Local_.pty.fallback.can_be_overridden_by_config ________________
self = <runners.Local_.pty.fallback object at 0x7fcc879f4d90>
@mock_pty(isatty=False)
def can_be_overridden_by_config(self):
> self._runner(run={"fallback": False}).run(_, pty=True)
tests/runners.py:1639:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516424904128'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_______ Local_.pty.fallback.overridden_fallback_affects_result_pty_value _______
self = <runners.Local_.pty.fallback object at 0x7fcc879ec070>
@mock_pty(isatty=False)
def overridden_fallback_affects_result_pty_value(self):
> assert self._run(_, pty=True, fallback=False).pty is True
tests/runners.py:1650:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516422244816'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
____________ Local_.shell.defaults_to_bash_or_cmdexe_when_pty_True _____________
self = <runners.Local_.shell object at 0x7fcc879f4f70>
mock_os = <MagicMock name='os' id='140516422674032'>
@mock_pty(insert_os=True)
def defaults_to_bash_or_cmdexe_when_pty_True(self, mock_os):
# NOTE: yea, windows can't run pty is true, but this is really
# testing config behavior, so...meh
> self._run(_, pty=True)
tests/runners.py:1657:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516428500752'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_________________ Local_.shell.may_be_overridden_when_pty_True _________________
self = <runners.Local_.shell object at 0x7fcc879f4790>
mock_os = <MagicMock name='os' id='140516380911792'>
@mock_pty(insert_os=True)
def may_be_overridden_when_pty_True(self, mock_os):
> self._run(_, pty=True, shell="/bin/zsh")
tests/runners.py:1669:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516422882064'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
_____________________ Local_.env.uses_execve_for_pty_True ______________________
self = <runners.Local_.env object at 0x7fcc879f23a0>
mock_os = <MagicMock name='os' id='140516426180256'>
@mock_pty(insert_os=True)
def uses_execve_for_pty_True(self, mock_os):
type(mock_os).environ = {"OTHERVAR": "OTHERVAL"}
> self._run(_, pty=True, env={"FOO": "BAR"})
tests/runners.py:1691:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/runners.py:1533: in _run
return _run(*args, **dict(kwargs, klass=_FastLocal))
tests/runners.py:65: in _run
return klass(context).run(*args, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:395: in run
return self._run_body(command, **kwargs)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:440: in _run_body
self.start(command, self.opts["shell"], self.env)
../../BUILDROOT/python-invoke-2.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/invoke/runners.py:1329: in start
fcntl.ioctl(sys.stdout.fileno(), termios.TIOCSWINSZ, winsize)
/usr/lib64/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
/usr/lib64/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='ioctl' id='140516423831024'>
args = (1, 21524, b'\x18\x00P\x00\x00\x00\x00\x00'), kwargs = {}, effect = None
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
raise effect
elif not _callable(effect):
result = next(effect)
if _is_exception(result):
raise result
else:
result = effect(*args, **kwargs)
if result is not DEFAULT:
return result
if self._mock_return_value is not DEFAULT:
return self.return_value
if self._mock_wraps is not None:
> return self._mock_wraps(*args, **kwargs)
E OSError: [Errno 25] Inappropriate ioctl for device
/usr/lib64/python3.8/unittest/mock.py:1155: OSError
=========================== short test summary info ============================
SKIPPED [1] tests/context.py:330: Skipped
SKIPPED [1] tests/context.py:350: Skipped
SKIPPED [1] tests/parser_argument.py:95: Skipped
SKIPPED [1] tests/program.py:536: Skipped
SKIPPED [1] tests/program.py:539: Skipped
SKIPPED [1] tests/runners.py:400: Skipped
SKIPPED [1] tests/runners.py:836: Skipped
SKIPPED [1] tests/runners.py:1594: Skipped
SKIPPED [1] tests/task.py:57: Skipped
SKIPPED [1] tests/terminals.py:75: Skipped
SKIPPED [1] tests/terminals.py:78: Skipped
FAILED tests/runners.py::Local_::pty::when_pty_True_we_use_pty_fork_and_os_exec
FAILED tests/runners.py::Local_::pty::pty_uses_WEXITSTATUS_if_WIFEXITED - OSE...
FAILED tests/runners.py::Local_::pty::pty_uses_WTERMSIG_if_WIFSIGNALED - OSEr...
FAILED tests/runners.py::Local_::pty::WTERMSIG_result_turned_negative_to_match_subprocess
FAILED tests/runners.py::Local_::pty::pty_is_set_to_controlling_terminal_size
FAILED tests/runners.py::Local_::pty::spurious_OSErrors_handled_gracefully - ...
FAILED tests/runners.py::Local_::pty::other_spurious_OSErrors_handled_gracefully
FAILED tests/runners.py::Local_::pty::non_spurious_OSErrors_bubble_up - OSErr...
FAILED tests/runners.py::Local_::pty::stop_mutes_errors_on_pty_close - OSErro...
FAILED tests/runners.py::Local_::pty::fallback::can_be_overridden_by_kwarg - ...
FAILED tests/runners.py::Local_::pty::fallback::can_be_overridden_by_config
FAILED tests/runners.py::Local_::pty::fallback::overridden_fallback_affects_result_pty_value
FAILED tests/runners.py::Local_::shell::defaults_to_bash_or_cmdexe_when_pty_True
FAILED tests/runners.py::Local_::shell::may_be_overridden_when_pty_True - OSE...
FAILED tests/runners.py::Local_::env::uses_execve_for_pty_True - OSError: [Er...
================= 15 failed, 953 passed, 11 skipped in 10.58s ================== |
FYI in my build procedure I've added those failing units to --deselect list assuming that it si only test suite and not actual; module code issue. Nevertheless thank you for your time so far 😄 👍 |
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Full pytest output is in attachment python-invoke-pytest.txt
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: