Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- testing/test_collection.py::test_does_not_crash_on_recursive_symlink SKIPPED [ 60%]
- testing/test_collection.py::test_collect_short_file_windows
- ============================================================================================================= XPASSES =============================================================================================================
- _____________________________________________________________________________________ TestLocalPath.test_make_numbered_dir_multiprocess_safe ______________________________________________________________________________________
- ------------------------------------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------------------------------------
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
- with os.fdopen(fd, "w") as f:
- ===================================================================================================== short test summary info =====================================================================================================
- XPASS testing/_py/test_local.py::TestLocalPath::test_make_numbered_dir_multiprocess_safe - #11603
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- suffix = '', prefix = 'pytest-cache-files-', dir = WindowsPath('C:/Users')
- def mkdtemp(suffix=None, prefix=None, dir=None):
- """User-callable function to create and return a unique temporary
- directory. The return value is the pathname of the directory.
- Arguments are as for mkstemp, except that the 'text' argument is
- not accepted.
- The directory is readable, writable, and searchable only by the
- creating user.
- Caller is responsible for deleting the directory when done with it.
- """
- prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
- names = _get_candidate_names()
- if output_type is bytes:
- names = map(_os.fsencode, names)
- for seq in range(TMP_MAX):
- name = next(names)
- file = _os.path.join(dir, prefix + name + suffix)
- _sys.audit("tempfile.mkdtemp", file)
- try:
- > _os.mkdir(file, 0o700)
- E PermissionError: [WinError 5] Access is denied: 'C:\\Users\\pytest-cache-files-l14ps4yi'
- C:\Python311\Lib\tempfile.py:368: PermissionError
- During handling of the above exception, another exception occurred:
- config = <_pytest.config.Config object at 0x000002F4F8906990>, doit = <function _main at 0x000002F4F86D2980>
- def wrap_session(
- config: Config, doit: Callable[[Config, Session], int | ExitCode | None]
- ) -> int | ExitCode:
- """Skeleton command line program."""
- session = Session.from_config(config)
- session.exitstatus = ExitCode.OK
- initstate = 0
- try:
- try:
- config._do_configure()
- initstate = 1
- config.hook.pytest_sessionstart(session=session)
- initstate = 2
- > session.exitstatus = doit(config, session) or 0
- ^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:290:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- config = <_pytest.config.Config object at 0x000002F4F8906990>, session = <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>
- def _main(config: Config, session: Session) -> int | ExitCode | None:
- """Default command line protocol for initialization, session,
- running tests and reporting."""
- config.hook.pytest_collection(session=session)
- > config.hook.pytest_runtestloop(session=session)
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:344:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <HookCaller 'pytest_runtestloop'>, kwargs = {'session': <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>}, firstresult = True
- def __call__(self, **kwargs: object) -> Any:
- """Call the hook.
- Only accepts keyword arguments, which should match the hook
- specification.
- Returns the result(s) of calling all registered plugins, see
- :ref:`calling`.
- """
- assert not self.is_historic(), (
- "Cannot directly call a historic hook - use call_historic instead."
- )
- self._verify_all_args_are_provided(kwargs)
- firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
- # Copy because plugins may register other plugins during iteration (#438).
- > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_runtestloop'
- methods = [<HookImpl plugin_name='main', plugin=<module '_pytest.main' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\pyte...92F590>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x000002F4FA2EE090>>]
- kwargs = {'session': <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>}, firstresult = True
- def _hookexec(
- self,
- hook_name: str,
- methods: Sequence[HookImpl],
- kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- # called from all hookcaller instances.
- # enable_tracing will set its own wrapping function at self._inner_hookexec
- > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.logging.LoggingPlugin object at 0x000002F4FA2EE090>, session = <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>
- @hookimpl(wrapper=True)
- def pytest_runtestloop(self, session: Session) -> Generator[None, object, object]:
- if session.config.option.collectonly:
- return (yield)
- if self._log_cli_enabled() and self._config.get_verbosity() < 1:
- # The verbose flag is needed to avoid messy test progress output.
- self._config.option.verbose = 1
- with catching_logs(self.log_cli_handler, level=self.log_cli_level):
- with catching_logs(self.log_file_handler, level=self.log_file_level):
- > return (yield) # Run all the tests.
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\logging.py:801:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.terminal.TerminalReporter object at 0x000002F4F892F590>
- @hookimpl(wrapper=True)
- def pytest_runtestloop(self) -> Generator[None, object, object]:
- > result = yield
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\terminal.py:688:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- session = <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>
- def pytest_runtestloop(session: Session) -> bool:
- if session.testsfailed and not session.config.option.continue_on_collection_errors:
- raise session.Interrupted(
- f"{session.testsfailed} error{'s' if session.testsfailed != 1 else ''} during collection"
- )
- if session.config.option.collectonly:
- return True
- for i, item in enumerate(session.items):
- nextitem = session.items[i + 1] if i + 1 < len(session.items) else None
- > item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:368:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <HookCaller 'pytest_runtest_protocol'>, kwargs = {'item': <Function test_collect_short_file_windows>, 'nextitem': <Function test_collect_short_file_windows_multi_level_symlink>}, firstresult = True
- def __call__(self, **kwargs: object) -> Any:
- """Call the hook.
- Only accepts keyword arguments, which should match the hook
- specification.
- Returns the result(s) of calling all registered plugins, see
- :ref:`calling`.
- """
- assert not self.is_historic(), (
- "Cannot directly call a historic hook - use call_historic instead."
- )
- self._verify_all_args_are_provided(kwargs)
- firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
- # Copy because plugins may register other plugins during iteration (#438).
- > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_runtest_protocol'
- methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\...m 'C:\\Users\\jordan.macdonald\\source\\macdjord\\pytest.git\\.tox\\py311\\Lib\\site-packages\\_pytest\\warnings.py'>>]
- kwargs = {'item': <Function test_collect_short_file_windows>, 'nextitem': <Function test_collect_short_file_windows_multi_level_symlink>}, firstresult = True
- def _hookexec(
- self,
- hook_name: str,
- methods: Sequence[HookImpl],
- kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- # called from all hookcaller instances.
- # enable_tracing will set its own wrapping function at self._inner_hookexec
- > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>
- @pytest.hookimpl(wrapper=True, tryfirst=True)
- def pytest_runtest_protocol(item: Item) -> Generator[None, object, object]:
- with catch_warnings_for_item(
- config=item.config, ihook=item.ihook, when="runtest", item=item
- ):
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\warnings.py:90:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>
- @hookimpl(wrapper=True, tryfirst=True)
- def pytest_runtest_protocol(item: Item) -> Generator[None, object, object]:
- """Setup the pytest_assertrepr_compare and pytest_assertion_pass hooks.
- The rewrite module will use util._reprcompare if it exists to use custom
- reporting via the pytest_assertrepr_compare hook. This sets up this custom
- comparison for the test.
- """
- ihook = item.ihook
- def callbinrepr(op, left: object, right: object) -> str | None:
- """Call the pytest_assertrepr_compare hook and prepare the result.
- This uses the first result from the hook and then ensures the
- following:
- * Overly verbose explanations are truncated unless configured otherwise
- (eg. if running in verbose mode).
- * Embedded newlines are escaped to help util.format_explanation()
- later.
- * If the rewrite mode is used embedded %-characters are replaced
- to protect later % formatting.
- The result can be formatted by util.format_explanation() for
- pretty printing.
- """
- hook_result = ihook.pytest_assertrepr_compare(
- config=item.config, op=op, left=left, right=right
- )
- for new_expl in hook_result:
- if new_expl:
- new_expl = truncate.truncate_if_required(new_expl, item)
- new_expl = [line.replace("\n", "\\n") for line in new_expl]
- res = "\n~".join(new_expl)
- if item.config.getvalue("assertmode") == "rewrite":
- res = res.replace("%", "%%")
- return res
- return None
- saved_assert_hooks = util._reprcompare, util._assertion_pass
- util._reprcompare = callbinrepr
- util._config = item.config
- if ihook.pytest_assertion_pass.get_hookimpls():
- def call_assertion_pass_hook(lineno: int, orig: str, expl: str) -> None:
- ihook.pytest_assertion_pass(item=item, lineno=lineno, orig=orig, expl=expl)
- util._assertion_pass = call_assertion_pass_hook
- try:
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\assertion\__init__.py:192:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>
- @hookimpl(wrapper=True)
- def pytest_runtest_protocol(item: Item) -> Iterator[None]:
- if _get_twisted_version() is TwistedVersion.Version24:
- import twisted.python.failure as ut
- # Monkeypatch `Failure.__init__` to store the raw exception info.
- original__init__ = ut.Failure.__init__
- def store_raw_exception_info(
- self, exc_value=None, exc_type=None, exc_tb=None, captureVars=None
- ): # pragma: no cover
- if exc_value is None:
- raw_exc_info = sys.exc_info()
- else:
- if exc_type is None:
- exc_type = type(exc_value)
- if exc_tb is None:
- exc_tb = sys.exc_info()[2]
- raw_exc_info = (exc_type, exc_value, exc_tb)
- setattr(self, TWISTED_RAW_EXCINFO_ATTR, tuple(raw_exc_info))
- try:
- original__init__(
- self, exc_value, exc_type, exc_tb, captureVars=captureVars
- )
- except TypeError: # pragma: no cover
- original__init__(self, exc_value, exc_type, exc_tb)
- with MonkeyPatch.context() as patcher:
- patcher.setattr(ut.Failure, "__init__", store_raw_exception_info)
- return (yield)
- else:
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\unittest.py:461:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>
- @pytest.hookimpl(wrapper=True, trylast=True)
- def pytest_runtest_protocol(item: Item) -> Generator[None, object, object]:
- timeout = get_timeout_config_value(item.config)
- if timeout > 0:
- import faulthandler
- stderr = item.config.stash[fault_handler_stderr_fd_key]
- faulthandler.dump_traceback_later(timeout, file=stderr)
- try:
- return (yield)
- finally:
- faulthandler.cancel_dump_traceback_later()
- else:
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\faulthandler.py:88:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>, nextitem = <Function test_collect_short_file_windows_multi_level_symlink>
- def pytest_runtest_protocol(item: Item, nextitem: Item | None) -> bool:
- ihook = item.ihook
- ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
- > runtestprotocol(item, nextitem=nextitem)
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:117:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>, log = True, nextitem = <Function test_collect_short_file_windows_multi_level_symlink>
- def runtestprotocol(
- item: Item, log: bool = True, nextitem: Item | None = None
- ) -> list[TestReport]:
- hasrequest = hasattr(item, "_request")
- if hasrequest and not item._request: # type: ignore[attr-defined]
- # This only happens if the item is re-run, as is done by
- # pytest-rerunfailures.
- item._initrequest() # type: ignore[attr-defined]
- rep = call_and_report(item, "setup", log)
- reports = [rep]
- if rep.passed:
- if item.config.getoption("setupshow", False):
- show_test_item(item)
- if not item.config.getoption("setuponly", False):
- > reports.append(call_and_report(item, "call", log))
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:136:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>, when = 'call', log = True, kwds = {}, ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x000002F4F8906AD0>
- reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
- def call_and_report(
- item: Item, when: Literal["setup", "call", "teardown"], log: bool = True, **kwds
- ) -> TestReport:
- ihook = item.ihook
- if when == "setup":
- runtest_hook: Callable[..., None] = ihook.pytest_runtest_setup
- elif when == "call":
- runtest_hook = ihook.pytest_runtest_call
- elif when == "teardown":
- runtest_hook = ihook.pytest_runtest_teardown
- else:
- assert False, f"Unhandled runtest hook case: {when}"
- reraise: tuple[type[BaseException], ...] = (Exit,)
- if not item.config.getoption("usepdb", False):
- reraise += (KeyboardInterrupt,)
- > call = CallInfo.from_call(
- lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
- )
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:245:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- cls = <class '_pytest.runner.CallInfo'>, func = <function call_and_report.<locals>.<lambda> at 0x000002F4FF889940>, when = 'call', reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
- @classmethod
- def from_call(
- cls,
- func: Callable[[], TResult],
- when: Literal["collect", "setup", "call", "teardown"],
- reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
- ) -> CallInfo[TResult]:
- """Call func, wrapping the result in a CallInfo.
- :param func:
- The function to call. Called without arguments.
- :type func: Callable[[], _pytest.runner.TResult]
- :param when:
- The phase in which the function is called.
- :param reraise:
- Exception or exceptions that shall propagate if raised by the
- function, instead of being wrapped in the CallInfo.
- """
- excinfo = None
- instant = timing.Instant()
- try:
- > result: TResult | None = func()
- ^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:344:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- )
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:246:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <HookCaller 'pytest_runtest_call'>, kwargs = {'item': <Function test_collect_short_file_windows>}, firstresult = False
- def __call__(self, **kwargs: object) -> Any:
- """Call the hook.
- Only accepts keyword arguments, which should match the hook
- specification.
- Returns the result(s) of calling all registered plugins, see
- :ref:`calling`.
- """
- assert not self.is_historic(), (
- "Cannot directly call a historic hook - use call_historic instead."
- )
- self._verify_all_args_are_provided(kwargs)
- firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
- # Copy because plugins may register other plugins during iteration (#438).
- > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_runtest_call'
- methods = [<HookImpl plugin_name='threadexception', plugin=<module '_pytest.threadexception' from 'C:\\Users\\jordan.macdonald\\... plugin_name='capturemanager', plugin=<CaptureManager _method='fd' _global_capturing=None _capture_fixture=None>>, ...]
- kwargs = {'item': <Function test_collect_short_file_windows>}, firstresult = False
- def _hookexec(
- self,
- hook_name: str,
- methods: Sequence[HookImpl],
- kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- # called from all hookcaller instances.
- # enable_tracing will set its own wrapping function at self._inner_hookexec
- > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.logging.LoggingPlugin object at 0x000002F4FA2EE090>, item = <Function test_collect_short_file_windows>
- @hookimpl(wrapper=True)
- def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]:
- self.log_cli_handler.set_when("call")
- with self._runtest_for(item, "call"):
- > yield
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\logging.py:850:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <CaptureManager _method='fd' _global_capturing=None _capture_fixture=None>, item = <Function test_collect_short_file_windows>
- @hookimpl(wrapper=True)
- def pytest_runtest_call(self, item: Item) -> Generator[None]:
- with self.item_capture("call", item):
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\capture.py:900:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- hook_impl = <HookImpl plugin_name='hypothesispytest', plugin=<module '_hypothesis_pytestplugin' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\pytest.git\\.tox\\py311\\Lib\\site-packages\\_hypothesis_pytestplugin.py'>>
- hook_name = 'pytest_runtest_call', args = [<Function test_collect_short_file_windows>]
- def run_old_style_hookwrapper(
- hook_impl: HookImpl, hook_name: str, args: Sequence[object]
- ) -> Teardown:
- """
- backward compatibility wrapper to run a old style hookwrapper as a wrapper
- """
- teardown: Teardown = cast(Teardown, hook_impl.function(*args))
- try:
- next(teardown)
- except StopIteration:
- _raise_wrapfail(teardown, "did not yield")
- try:
- res = yield
- result = Result(res, None)
- except BaseException as exc:
- result = Result(None, exc)
- try:
- teardown.send(result)
- except StopIteration:
- pass
- except BaseException as e:
- _warn_teardown_exception(hook_name, hook_impl, e)
- raise
- else:
- _raise_wrapfail(teardown, "has second yield")
- finally:
- teardown.close()
- > return result.get_result()
- ^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_callers.py:53:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- hook_impl = <HookImpl plugin_name='hypothesispytest', plugin=<module '_hypothesis_pytestplugin' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\pytest.git\\.tox\\py311\\Lib\\site-packages\\_hypothesis_pytestplugin.py'>>
- hook_name = 'pytest_runtest_call', args = [<Function test_collect_short_file_windows>]
- def run_old_style_hookwrapper(
- hook_impl: HookImpl, hook_name: str, args: Sequence[object]
- ) -> Teardown:
- """
- backward compatibility wrapper to run a old style hookwrapper as a wrapper
- """
- teardown: Teardown = cast(Teardown, hook_impl.function(*args))
- try:
- next(teardown)
- except StopIteration:
- _raise_wrapfail(teardown, "did not yield")
- try:
- > res = yield
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_callers.py:38:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>
- @hookimpl(wrapper=True)
- def pytest_runtest_call(item: Item) -> Generator[None]:
- xfailed = item.stash.get(xfailed_key, None)
- if xfailed is None:
- item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item)
- if xfailed and not item.config.option.runxfail and not xfailed.run:
- xfail("[NOTRUN] " + xfailed.reason)
- try:
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\skipping.py:262:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- item = <Function test_collect_short_file_windows>
- def pytest_runtest_call(item: Item) -> None:
- _update_current_test_var(item, "call")
- try:
- del sys.last_type
- del sys.last_value
- del sys.last_traceback
- if sys.version_info >= (3, 12, 0):
- del sys.last_exc # type:ignore[attr-defined]
- except AttributeError:
- pass
- try:
- > item.runtest()
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:178:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <Function test_collect_short_file_windows>
- def runtest(self) -> None:
- """Execute the underlying test function."""
- > self.ihook.pytest_pyfunc_call(pyfuncitem=self)
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\python.py:1673:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <HookCaller 'pytest_pyfunc_call'>, kwargs = {'pyfuncitem': <Function test_collect_short_file_windows>}, firstresult = True
- def __call__(self, **kwargs: object) -> Any:
- """Call the hook.
- Only accepts keyword arguments, which should match the hook
- specification.
- Returns the result(s) of calling all registered plugins, see
- :ref:`calling`.
- """
- assert not self.is_historic(), (
- "Cannot directly call a historic hook - use call_historic instead."
- )
- self._verify_all_args_are_provided(kwargs)
- firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
- # Copy because plugins may register other plugins during iteration (#438).
- > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_pyfunc_call'
- methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\pytest.git\\.tox\\py311\\Lib\\site-packages\\_pytest\\python.py'>>]
- kwargs = {'pyfuncitem': <Function test_collect_short_file_windows>}, firstresult = True
- def _hookexec(
- self,
- hook_name: str,
- methods: Sequence[HookImpl],
- kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- # called from all hookcaller instances.
- # enable_tracing will set its own wrapping function at self._inner_hookexec
- > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pyfuncitem = <Function test_collect_short_file_windows>
- @hookimpl(trylast=True)
- def pytest_pyfunc_call(pyfuncitem: Function) -> object | None:
- testfunction = pyfuncitem.obj
- if is_async_function(testfunction):
- async_fail(pyfuncitem.nodeid)
- funcargs = pyfuncitem.funcargs
- testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
- > result = testfunction(**testargs)
- ^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\python.py:157:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pytester = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>
- @pytest.mark.skipif(not sys.platform.startswith("win"), reason="Windows only")
- def test_collect_short_file_windows(pytester: Pytester) -> None:
- """Reproducer for #11895: short paths not collected on Windows."""
- short_path = tempfile.mkdtemp()
- if "~" not in short_path: # pragma: no cover
- if running_on_ci():
- # On CI, we are expecting that under the current GitHub actions configuration,
- # tempfile.mkdtemp() is producing short paths, so we want to fail to prevent
- # this from silently changing without us noticing.
- pytest.fail(
- f"tempfile.mkdtemp() failed to produce a short path on CI: {short_path}"
- )
- else:
- # We want to skip failing this test locally in this situation because
- # depending on the local configuration tempfile.mkdtemp() might not produce a short path:
- # For example, user might have configured %TEMP% exactly to avoid generating short paths.
- pytest.skip(
- f"tempfile.mkdtemp() failed to produce a short path: {short_path}, skipping"
- )
- test_file = Path(short_path).joinpath("test_collect_short_file_windows.py")
- test_file.write_text("def test(): pass", encoding="UTF-8")
- > result = pytester.runpytest(short_path)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\testing\test_collection.py:1779:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>, args = ('C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5',), kwargs = {}
- new_args = ['C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5', '--basetemp=C:\\Users\\jordan.macdonald\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-11\\basetemp']
- def runpytest(self, *args: str | os.PathLike[str], **kwargs: Any) -> RunResult:
- """Run pytest inline or in a subprocess, depending on the command line
- option "--runpytest" and return a :py:class:`~pytest.RunResult`."""
- new_args = self._ensure_basetemp(args)
- if self._method == "inprocess":
- > return self.runpytest_inprocess(*new_args, **kwargs)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\pytester.py:1202:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>
- args = ('C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5', '--basetemp=C:\\Users\\jordan.macdonald\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-11\\basetemp'), kwargs = {}, syspathinsert = False
- instant = Instant(time=1759274381.204302, perf_count=523254.6523219)
- capture = <MultiCapture out=<SysCapture stdout _old=<UNSET> _state='done' tmpfile=<_io.TextIOWrapper encoding='UTF-8'>> err=<Sys...='done' tmpfile=<_pytest.capture.DontReadFromInput object at 0x000002F4FF792FD0>> _state='stopped' _in_suspended=False>
- out = '============================= test session starts =============================\nplatform win32 -- Python 3.11.2, pyt...ir: C:\\Users\ncollected 1 item\n\n..\\..\\..\\tmpsb2856z5\\test_collect_short_file_windows.py . [100%]'
- err = ''
- def runpytest_inprocess(
- self, *args: str | os.PathLike[str], **kwargs: Any
- ) -> RunResult:
- """Return result of running pytest in-process, providing a similar
- interface to what self.runpytest() provides."""
- syspathinsert = kwargs.pop("syspathinsert", False)
- if syspathinsert:
- self.syspathinsert()
- instant = timing.Instant()
- capture = _get_multicapture("sys")
- capture.start_capturing()
- try:
- try:
- > reprec = self.inline_run(*args, **kwargs)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\pytester.py:1167:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>
- plugins = [<_pytest.pytester.Pytester.inline_run.<locals>.PytesterHelperPlugin object at 0x000002F4FFDC9F50>], no_reraise_ctrlc = False
- args = ('C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5', '--basetemp=C:\\Users\\jordan.macdonald\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-11\\basetemp')
- finalizers = [<bound method SysModulesSnapshot.restore of <_pytest.pytester.SysModulesSnapshot object at 0x000002F4FFDC99D0>>, <bound method SysPathsSnapshot.restore of <_pytest.pytester.SysPathsSnapshot object at 0x000002F4FFDC8BD0>>]
- def inline_run(
- self,
- *args: str | os.PathLike[str],
- plugins=(),
- no_reraise_ctrlc: bool = False,
- ) -> HookRecorder:
- """Run ``pytest.main()`` in-process, returning a HookRecorder.
- Runs the :py:func:`pytest.main` function to run all of pytest inside
- the test process itself. This means it can return a
- :py:class:`HookRecorder` instance which gives more detailed results
- from that run than can be done by matching stdout/stderr from
- :py:meth:`runpytest`.
- :param args:
- Command line arguments to pass to :py:func:`pytest.main`.
- :param plugins:
- Extra plugin instances the ``pytest.main()`` instance should use.
- :param no_reraise_ctrlc:
- Typically we reraise keyboard interrupts from the child run. If
- True, the KeyboardInterrupt exception is captured.
- """
- from _pytest.unraisableexception import gc_collect_iterations_key
- # (maybe a cpython bug?) the importlib cache sometimes isn't updated
- # properly between file creation and inline_run (especially if imports
- # are interspersed with file creation)
- importlib.invalidate_caches()
- plugins = list(plugins)
- finalizers = []
- try:
- # Any sys.module or sys.path changes done while running pytest
- # inline should be reverted after the test run completes to avoid
- # clashing with later inline tests run within the same pytest test,
- # e.g. just because they use matching test module names.
- finalizers.append(self.__take_sys_modules_snapshot().restore)
- finalizers.append(SysPathsSnapshot().restore)
- # Important note:
- # - our tests should not leave any other references/registrations
- # laying around other than possibly loaded test modules
- # referenced from sys.modules, as nothing will clean those up
- # automatically
- rec = []
- class PytesterHelperPlugin:
- @staticmethod
- def pytest_configure(config: Config) -> None:
- rec.append(self.make_hook_recorder(config.pluginmanager))
- # The unraisable plugin GC collect slows down inline
- # pytester runs too much.
- config.stash[gc_collect_iterations_key] = 0
- plugins.append(PytesterHelperPlugin())
- > ret = main([str(x) for x in args], plugins=plugins)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\pytester.py:1132:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- args = ['C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5', '--basetemp=C:\\Users\\jordan.macdonald\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-11\\basetemp']
- plugins = [<_pytest.pytester.Pytester.inline_run.<locals>.PytesterHelperPlugin object at 0x000002F4FFDC9F50>]
- def main(
- args: list[str] | os.PathLike[str] | None = None,
- plugins: Sequence[str | _PluggyPlugin] | None = None,
- ) -> int | ExitCode:
- """Perform an in-process test run.
- :param args:
- List of command line arguments. If `None` or not given, defaults to reading
- arguments directly from the process command line (:data:`sys.argv`).
- :param plugins: List of plugin objects to be auto-registered during initialization.
- :returns: An exit code.
- """
- old_pytest_version = os.environ.get("PYTEST_VERSION")
- try:
- os.environ["PYTEST_VERSION"] = __version__
- try:
- config = _prepareconfig(args, plugins)
- except ConftestImportFailure as e:
- exc_info = ExceptionInfo.from_exception(e.cause)
- tw = TerminalWriter(sys.stderr)
- tw.line(f"ImportError while loading conftest '{e.path}'.", red=True)
- exc_info.traceback = exc_info.traceback.filter(
- filter_traceback_for_conftest_import_failure
- )
- exc_repr = (
- exc_info.getrepr(style="short", chain=False)
- if exc_info.traceback
- else exc_info.exconly()
- )
- formatted_tb = str(exc_repr)
- for line in formatted_tb.splitlines():
- tw.line(line.rstrip(), red=True)
- return ExitCode.USAGE_ERROR
- else:
- try:
- > ret: ExitCode | int = config.hook.pytest_cmdline_main(config=config)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\config\__init__.py:175:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <HookCaller 'pytest_cmdline_main'>, kwargs = {'config': <_pytest.config.Config object at 0x000002F4FEA50310>}, firstresult = True
- def __call__(self, **kwargs: object) -> Any:
- """Call the hook.
- Only accepts keyword arguments, which should match the hook
- specification.
- Returns the result(s) of calling all registered plugins, see
- :ref:`calling`.
- """
- assert not self.is_historic(), (
- "Cannot directly call a historic hook - use call_historic instead."
- )
- self._verify_all_args_are_provided(kwargs)
- firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
- # Copy because plugins may register other plugins during iteration (#438).
- > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.config.PytestPluginManager object at 0x000002F4FFDCB750>, hook_name = 'pytest_cmdline_main'
- methods = [<HookImpl plugin_name='main', plugin=<module '_pytest.main' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\pyte...\Users\\jordan.macdonald\\source\\macdjord\\pytest.git\\.tox\\py311\\Lib\\site-packages\\_pytest\\setuponly.py'>>, ...]
- kwargs = {'config': <_pytest.config.Config object at 0x000002F4FEA50310>}, firstresult = True
- def _hookexec(
- self,
- hook_name: str,
- methods: Sequence[HookImpl],
- kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- # called from all hookcaller instances.
- # enable_tracing will set its own wrapping function at self._inner_hookexec
- > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- config = <_pytest.config.Config object at 0x000002F4FEA50310>
- def pytest_cmdline_main(config: Config) -> int | ExitCode:
- > return wrap_session(config, _main)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:337:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- config = <_pytest.config.Config object at 0x000002F4FEA50310>, doit = <function _main at 0x000002F4F86D2980>
- def wrap_session(
- config: Config, doit: Callable[[Config, Session], int | ExitCode | None]
- ) -> int | ExitCode:
- """Skeleton command line program."""
- session = Session.from_config(config)
- session.exitstatus = ExitCode.OK
- initstate = 0
- try:
- try:
- config._do_configure()
- initstate = 1
- config.hook.pytest_sessionstart(session=session)
- initstate = 2
- session.exitstatus = doit(config, session) or 0
- except UsageError:
- session.exitstatus = ExitCode.USAGE_ERROR
- raise
- except Failed:
- session.exitstatus = ExitCode.TESTS_FAILED
- except (KeyboardInterrupt, exit.Exception):
- excinfo = _pytest._code.ExceptionInfo.from_current()
- exitstatus: int | ExitCode = ExitCode.INTERRUPTED
- if isinstance(excinfo.value, exit.Exception):
- if excinfo.value.returncode is not None:
- exitstatus = excinfo.value.returncode
- if initstate < 2:
- sys.stderr.write(f"{excinfo.typename}: {excinfo.value.msg}\n")
- config.hook.pytest_keyboard_interrupt(excinfo=excinfo)
- session.exitstatus = exitstatus
- except BaseException:
- session.exitstatus = ExitCode.INTERNAL_ERROR
- excinfo = _pytest._code.ExceptionInfo.from_current()
- try:
- config.notify_exception(excinfo, config.option)
- except exit.Exception as exc:
- if exc.returncode is not None:
- session.exitstatus = exc.returncode
- sys.stderr.write(f"{type(exc).__name__}: {exc}\n")
- else:
- if isinstance(excinfo.value, SystemExit):
- sys.stderr.write("mainloop: caught unexpected SystemExit!\n")
- finally:
- # Explicitly break reference cycle.
- excinfo = None # type: ignore
- os.chdir(session.startpath)
- if initstate >= 2:
- try:
- > config.hook.pytest_sessionfinish(
- session=session, exitstatus=session.exitstatus
- )
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:325:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <HookCaller 'pytest_sessionfinish'>, kwargs = {'exitstatus': 0, 'session': <Session exitstatus=0 testsfailed=0 testscollected=1>}, firstresult = False
- def __call__(self, **kwargs: object) -> Any:
- """Call the hook.
- Only accepts keyword arguments, which should match the hook
- specification.
- Returns the result(s) of calling all registered plugins, see
- :ref:`calling`.
- """
- assert not self.is_historic(), (
- "Cannot directly call a historic hook - use call_historic instead."
- )
- self._verify_all_args_are_provided(kwargs)
- firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
- # Copy because plugins may register other plugins during iteration (#438).
- > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.config.PytestPluginManager object at 0x000002F4FFDCB750>, hook_name = 'pytest_sessionfinish'
- methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\...E5D1D0>>, <HookImpl plugin_name='nfplugin', plugin=<_pytest.cacheprovider.NFPlugin object at 0x000002F4FFE5DFD0>>, ...]
- kwargs = {'exitstatus': 0, 'session': <Session exitstatus=0 testsfailed=0 testscollected=1>}, firstresult = False
- def _hookexec(
- self,
- hook_name: str,
- methods: Sequence[HookImpl],
- kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- # called from all hookcaller instances.
- # enable_tracing will set its own wrapping function at self._inner_hookexec
- > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- hook_name = 'pytest_sessionfinish'
- hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from 'C:\\Users\\jordan.macdonald\\source\\macdjord\\...E5D1D0>>, <HookImpl plugin_name='nfplugin', plugin=<_pytest.cacheprovider.NFPlugin object at 0x000002F4FFE5DFD0>>, ...]
- caller_kwargs = {'exitstatus': 0, 'session': <Session exitstatus=0 testsfailed=0 testscollected=1>}, firstresult = False
- def traced_hookexec(
- hook_name: str,
- hook_impls: Sequence[HookImpl],
- caller_kwargs: Mapping[str, object],
- firstresult: bool,
- ) -> object | list[object]:
- before(hook_name, hook_impls, caller_kwargs)
- outcome = Result.from_call(
- lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)
- )
- after(outcome, hook_name, hook_impls, caller_kwargs)
- > return outcome.get_result()
- ^^^^^^^^^^^^^^^^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:475:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- > lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- )
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:472:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.logging.LoggingPlugin object at 0x000002F4FFD1A950>
- @hookimpl(wrapper=True, tryfirst=True)
- def pytest_sessionfinish(self) -> Generator[None]:
- self.log_cli_handler.set_when("sessionfinish")
- with catching_logs(self.log_cli_handler, level=self.log_cli_level):
- with catching_logs(self.log_file_handler, level=self.log_file_level):
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\logging.py:873:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.terminal.TerminalReporter object at 0x000002F4FFE5FAD0>, session = <Session exitstatus=0 testsfailed=0 testscollected=1>, exitstatus = 0
- @hookimpl(wrapper=True)
- def pytest_sessionfinish(
- self, session: Session, exitstatus: int | ExitCode
- ) -> Generator[None]:
- > result = yield
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\terminal.py:936:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- session = <Session exitstatus=0 testsfailed=0 testscollected=1>
- @pytest.hookimpl(wrapper=True)
- def pytest_sessionfinish(session: Session) -> Generator[None]:
- config = session.config
- with catch_warnings_for_item(
- config=config, ihook=config.hook, when="config", item=None
- ):
- > return (yield)
- ^^^^^
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\warnings.py:119:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <_pytest.cacheprovider.NFPlugin object at 0x000002F4FFE5DFD0>
- def pytest_sessionfinish(self) -> None:
- config = self.config
- if config.getoption("cacheshow") or hasattr(config, "workerinput"):
- return
- if config.getoption("collectonly"):
- return
- assert config.cache is not None
- > config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:475:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = Cache(), key = 'cache/nodeids', value = ['jordan.macdonald/AppData/Local/Temp/tmpsb2856z5/test_collect_short_file_windows.py::test']
- def set(self, key: str, value: object) -> None:
- """Save value for the given key.
- :param key:
- Must be a ``/`` separated value. Usually the first
- name is the name of your plugin or your application.
- :param value:
- Must be of any combination of basic python types,
- including nested types like lists of dictionaries.
- """
- path = self._getvaluepath(key)
- try:
- > self._mkdir(path.parent)
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:184:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = Cache(), path = WindowsPath('C:/Users/.pytest_cache/v/cache')
- def _mkdir(self, path: Path) -> None:
- > self._ensure_cache_dir_and_supporting_files()
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:126:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = Cache()
- def _ensure_cache_dir_and_supporting_files(self) -> None:
- """Create the cache dir and its supporting files."""
- if self._cachedir.is_dir():
- return
- self._cachedir.parent.mkdir(parents=True, exist_ok=True)
- > with tempfile.TemporaryDirectory(
- prefix="pytest-cache-files-",
- dir=self._cachedir.parent,
- ) as newpath:
- ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:209:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <[AttributeError("'TemporaryDirectory' object has no attribute 'name'") raised in repr()] TemporaryDirectory object at 0x2f4ffd1b390>, suffix = None, prefix = 'pytest-cache-files-', dir = WindowsPath('C:/Users')
- ignore_cleanup_errors = False
- def __init__(self, suffix=None, prefix=None, dir=None,
- ignore_cleanup_errors=False):
- > self.name = mkdtemp(suffix, prefix, dir)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- C:\Python311\Lib\tempfile.py:854:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- suffix = '', prefix = 'pytest-cache-files-', dir = WindowsPath('C:/Users')
- def mkdtemp(suffix=None, prefix=None, dir=None):
- """User-callable function to create and return a unique temporary
- directory. The return value is the pathname of the directory.
- Arguments are as for mkstemp, except that the 'text' argument is
- not accepted.
- The directory is readable, writable, and searchable only by the
- creating user.
- Caller is responsible for deleting the directory when done with it.
- """
- prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
- names = _get_candidate_names()
- if output_type is bytes:
- names = map(_os.fsencode, names)
- for seq in range(TMP_MAX):
- name = next(names)
- file = _os.path.join(dir, prefix + name + suffix)
- _sys.audit("tempfile.mkdtemp", file)
- try:
- _os.mkdir(file, 0o700)
- except FileExistsError:
- continue # try again
- except PermissionError:
- # This exception is thrown when a directory with the chosen name
- # already exists on windows.
- > if (_os.name == 'nt' and _os.path.isdir(dir) and
- ^^^^^^^^^^^^^^^^^^^
- _os.access(dir, _os.W_OK)):
- C:\Python311\Lib\tempfile.py:374:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- s = WindowsPath('C:/Users')
- > ???
- E KeyboardInterrupt
- <frozen genericpath>:39: KeyboardInterrupt
- =============================================================================== 2274 passed, 105 skipped, 6 xfailed, 1 xpassed in 231.42s (0:03:51) ===============================================================================
- py311: exit 2 (236.50 seconds) C:\Users\jordan.macdonald\source\macdjord\pytest.git> pytest -v --full-trace pid=26888
- ROOT: [30252] KeyboardInterrupt - teardown started
- py311: FAIL code 2 (256.77=setup[20.27]+cmd[236.50] seconds)
- evaluation failed :( (257.41 seconds)
Add Comment
Please, Sign In to add comment