pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.42k stars 370 forks source link

2.0.0: pytest is failing in tests/runners.py units #933

Open kloczek opened 1 year ago

kloczek commented 1 year ago

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.

Here is pytest output:

```console + 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' ============================= test session starts ============================== platform linux -- Python 3.8.16, pytest-7.3.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/invoke-2.0.0 configfile: pytest.ini testpaths: tests plugins: relaxed-2.0.0 collected 980 items tests/cli.py ...................... [ 2%] tests/collection.py .................................................... [ 7%] ...................................... [ 11%] tests/completion.py ......................... [ 13%] tests/concurrency.py ...... [ 14%] tests/config.py ........................................................ [ 20%] ............................................................ [ 26%] tests/context.py .................................s.s................... [ 32%] ........................... [ 34%] tests/executor.py ..................................... [ 38%] tests/init.py ............................ [ 41%] tests/loader.py ............... [ 42%] tests/merge_dicts.py ............ [ 44%] tests/parser_argument.py ..................s................... [ 48%] tests/parser_context.py ............................................. [ 52%] tests/parser_parser.py ................................................. [ 57%] ........... [ 58%] tests/program.py ....................................................... [ 64%] ...ss.............................................................. [ 71%] tests/runners.py ....FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FFs..FFFFFFFF [ 76%] ..FFFFFFFFFFFF........FF..FFFFFFFsFFFFFFFFFFFFFFFFFFF.........F.FFFFF.FF [ 84%] FFF............FFFFFs.FFFFFF.FF.F..F......................... [ 90%] tests/task.py ......s................................................... [ 96%] .............. [ 97%] tests/terminals.py ......ss [ 98%] tests/util.py ....... [ 99%] tests/watchers.py ....... [100%] =================================== FAILURES =================================== [..] ================================================================================== 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:530: Skipped SKIPPED [1] tests/program.py:533: Skipped SKIPPED [1] tests/runners.py:400: Skipped SKIPPED [1] tests/runners.py:836: Skipped SKIPPED [1] tests/runners.py:1586: 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::Runner_::warn::honors_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::warn::kwarg_beats_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::warn::does_not_apply_to_watcher_errors - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::warn::does_not_apply_to_timeout_errors - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::hide::honors_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::hide::kwarg_beats_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::pty::pty_defaults_to_off - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::pty::honors_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::pty::kwarg_beats_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::shell::defaults_to_bash_or_cmdexe_when_pty_True - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::shell::defaults_to_bash_or_cmdexe_when_pty_False - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::shell::may_be_overridden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::shell::may_be_configured - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::shell::kwarg_beats_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::env::defaults_to_os_environ - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::env::updates_when_dict_given - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::env::replaces_when_replace_env_True - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::env::config_can_be_used - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::env::kwarg_wins_over_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::return_code - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::ok_attr_indicates_success - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::ok_attr_indicates_failure - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::failed_attr_indicates_success - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::failed_attr_indicates_failure - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::stdout_attribute_contains_stdout - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::stderr_attribute_contains_stderr - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::whether_pty_was_used - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::command_executed - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::shell_used - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::return_value::hide_param_exposed_and_normalized - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::command_echoing::off_by_default - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::command_echoing::enabled_via_kwarg - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::command_echoing::enabled_via_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::command_echoing::kwarg_beats_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::command_echoing::uses_ansi_bold - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::command_echoing::uses_custom_format - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::encoding::defaults_to_encoding_method_result - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::encoding::honors_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::both_hides_everything - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::True_hides_everything - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::out_only_hides_stdout - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::err_only_hides_stderr - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::accepts_stdout_alias_for_out - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::accepts_stderr_alias_for_err - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::None_hides_nothing - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::False_hides_nothing - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::does_not_affect_capturing - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_hiding::overrides_echoing - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::out_defaults_to_sys_stdout - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::err_defaults_to_sys_stderr - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::out_can_be_overridden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::overridden_out_is_never_hidden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::err_can_be_overridden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::overridden_err_is_never_hidden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::pty_defaults_to_sys - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_overrides::pty_out_can_be_overridden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_handling::writes_and_flushes_to_stdout - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::output_stream_handling::writes_and_flushes_to_stderr - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::fast_failures - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::non_1_return_codes_still_act_as_failure - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::UnexpectedExit_repr::similar_to_just_the_result_repr - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::displays_command_and_exit_code_by_default - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::does_not_display_stderr_when_pty_True - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::pty_stderr_message_wins_over_hidden_stderr - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::explicit_hidden_stream_tail_display - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::UnexpectedExit_str::displays_tails_of_streams_only_when_hidden - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::reason::is_None_for_regular_nonzero_exits - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::reason::is_exception_when_WatcherError_raised_internally - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::most_attrs_are_always_present - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::shell_exit_failure::exited_is_integer - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::shell_exit_failure::ok_bool_etc_are_falsey - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::shell_exit_failure::stringrep_notes_exit_status - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::watcher_failure::exited_is_None - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::watcher_failure::ok_and_bool_still_are_falsey - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::failure_handling::wrapped_result::watcher_failure::stringrep_lacks_exit_status - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::threading::errors_within_io_thread_body_bubble_up - AssertionError: assert 3 == 2 FAILED tests/runners.py::Runner_::threading::io_thread_errors_str_has_details - assert 'Saw 1 exceptions within threads' in "\nSaw 2 exceptions within threads (OhNoz, OSError):\n\n\nThread args: {'kwargs': {'buffer_': [],\n 'hide':...in read\n raise ... FAILED tests/runners.py::Runner_::watchers::nothing_is_written_to_stdin_by_default - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::watchers_responses_get_written_to_proc_stdin - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::multiple_hits_yields_multiple_responses - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::chunk_sizes_smaller_than_patterns_still_work_ok - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::both_out_and_err_are_scanned - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::multiple_patterns_works_as_expected - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::multiple_patterns_across_both_streams - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::honors_watchers_config_option - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::watchers::kwarg_overrides_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::character_buffered_stdin::setcbreak_called_on_tty_stdins - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::character_buffered_stdin::setcbreak_not_called_if_process_not_foregrounded - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::character_buffered_stdin::tty_stdins_have_settings_restored_by_default - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::character_buffered_stdin::tty_stdins_have_settings_restored_on_KeyboardInterrupt - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::character_buffered_stdin::setcbreak_not_called_if_terminal_seems_already_cbroken - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::send_interrupt::called_on_KeyboardInterrupt - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::send_interrupt::sends_escape_byte_sequence - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::timeout::start_timer_called_with_config_value - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::timeout::run_kwarg_honored - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::timeout::kwarg_wins_over_config - invoke.exceptions.ThreadException: FAILED tests/runners.py::Runner_::timeout::raises_CommandTimedOut_with_timeout_info - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::when_pty_True_we_use_pty_fork_and_os_exec - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::pty_uses_WEXITSTATUS_if_WIFEXITED - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::pty_uses_WTERMSIG_if_WIFSIGNALED - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::WTERMSIG_result_turned_negative_to_match_subprocess - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::pty_is_set_to_controlling_terminal_size - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::spurious_OSErrors_handled_gracefully - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::other_spurious_OSErrors_handled_gracefully - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::non_spurious_OSErrors_bubble_up - AssertionError: assert == OSError FAILED tests/runners.py::Local_::pty::stop_mutes_errors_on_pty_close - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::pty::fallback::can_be_overridden_by_kwarg - OSError: [Errno 25] Inappropriate ioctl for device FAILED tests/runners.py::Local_::pty::fallback::can_be_overridden_by_config - OSError: [Errno 25] Inappropriate ioctl for device FAILED tests/runners.py::Local_::pty::fallback::overridden_fallback_affects_result_pty_value - OSError: [Errno 25] Inappropriate ioctl for device FAILED tests/runners.py::Local_::shell::defaults_to_bash_or_cmdexe_when_pty_True - invoke.exceptions.ThreadException: FAILED tests/runners.py::Local_::shell::may_be_overridden_when_pty_True - FileNotFoundError: [Errno 2] No such file or directory: '/bin/zsh' FAILED tests/runners.py::Local_::env::uses_execve_for_pty_True - invoke.exceptions.ThreadException: ================================================================ 112 failed, 857 passed, 11 skipped, 402 warnings in 15.81s ================================================================= ```

Full pytest output is in attachment python-invoke-pytest.txt

Here is list of installed modules in build env

```console Package Version --------------- ------- asttokens 2.2.1 build 0.10.0 colorama 0.4.6 decorator 5.1.1 distro 1.8.0 exceptiongroup 1.0.0 executing 1.2.0 fluidity-sm 0.2.0 gpg 1.19.0 icecream 2.1.3 iniconfig 2.0.0 installer 0.7.0 lexicon 2.0.1 libcomps 0.1.19 packaging 23.0 pluggy 1.0.0 Pygments 2.15.0 pyproject_hooks 1.0.0 pytest 7.3.0 pytest-relaxed 2.0.0 python-dateutil 2.8.2 PyYAML 6.0 setuptools 65.6.3 six 1.16.0 tomli 2.0.1 wheel 0.40.0 ```
kuwv commented 1 year ago

@kloczek This is not an issue. Use the -s flag with pytest.

pytest -s tests/runners.py
kloczek commented 1 year ago

Just tested that and ..

```console + 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 = @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 = 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 = 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 = 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 = 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 = 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 = mock_os = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = mock_os = @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 = 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 = mock_os = @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 = 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 = mock_os = @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 = 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 ============================ ```
kuwv commented 1 year ago

What are the platform details?

kloczek commented 1 year ago

Linux x86/64. Here is list of modules installed in build env

```console 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 ```
kloczek commented 1 year ago

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 -s it fails of course so looks like that -s should be added to default pytest options.

kuwv commented 1 year ago

That's great. Lmk if you find out the specific cause and I'll add regression tests.

kloczek commented 1 year ago

It look like it was kind of premature confirmation. As long as I'm running pytest in terminal session in which is available pty everything is OK. When I've send the same package to prod builder where packages is build in batch mode without pty pytest fails

```console + 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 = @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 = 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 = 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 = 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 = 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 = 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 = mock_os = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = @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 = 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 = mock_os = @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 = 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 = mock_os = @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 = 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 = mock_os = @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 = 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 ================== ```
kloczek commented 1 year ago

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. In other words I'm assuming that it is it non-critical issue πŸ˜‹

Nevertheless thank you for your time so far πŸ˜„ πŸ‘