macdjord

PyTest Traceback

Sep 30th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.13 KB | Software | 0 0
  1. testing/test_collection.py::test_does_not_crash_on_recursive_symlink SKIPPED [ 60%]
  2. testing/test_collection.py::test_collect_short_file_windows
  3.  
  4. ============================================================================================================= XPASSES =============================================================================================================
  5. _____________________________________________________________________________________ TestLocalPath.test_make_numbered_dir_multiprocess_safe ______________________________________________________________________________________
  6. ------------------------------------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------------------------------------
  7. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  8. with os.fdopen(fd, "w") as f:
  9. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  10. with os.fdopen(fd, "w") as f:
  11. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  12. with os.fdopen(fd, "w") as f:
  13. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  14. with os.fdopen(fd, "w") as f:
  15. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  16. with os.fdopen(fd, "w") as f:
  17. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  18. with os.fdopen(fd, "w") as f:
  19. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  20. with os.fdopen(fd, "w") as f:
  21. C:\Users\jordan.macdonald\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\_py\path.py:1308: EncodingWarning: 'encoding' argument not specified
  22. with os.fdopen(fd, "w") as f:
  23. ===================================================================================================== short test summary info =====================================================================================================
  24. XPASS testing/_py/test_local.py::TestLocalPath::test_make_numbered_dir_multiprocess_safe - #11603
  25. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  26.  
  27. suffix = '', prefix = 'pytest-cache-files-', dir = WindowsPath('C:/Users')
  28.  
  29. def mkdtemp(suffix=None, prefix=None, dir=None):
  30. """User-callable function to create and return a unique temporary
  31. directory. The return value is the pathname of the directory.
  32.  
  33. Arguments are as for mkstemp, except that the 'text' argument is
  34. not accepted.
  35.  
  36. The directory is readable, writable, and searchable only by the
  37. creating user.
  38.  
  39. Caller is responsible for deleting the directory when done with it.
  40. """
  41.  
  42. prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  43.  
  44. names = _get_candidate_names()
  45. if output_type is bytes:
  46. names = map(_os.fsencode, names)
  47.  
  48. for seq in range(TMP_MAX):
  49. name = next(names)
  50. file = _os.path.join(dir, prefix + name + suffix)
  51. _sys.audit("tempfile.mkdtemp", file)
  52. try:
  53. > _os.mkdir(file, 0o700)
  54. E PermissionError: [WinError 5] Access is denied: 'C:\\Users\\pytest-cache-files-l14ps4yi'
  55.  
  56. C:\Python311\Lib\tempfile.py:368: PermissionError
  57.  
  58. During handling of the above exception, another exception occurred:
  59.  
  60. config = <_pytest.config.Config object at 0x000002F4F8906990>, doit = <function _main at 0x000002F4F86D2980>
  61.  
  62. def wrap_session(
  63. config: Config, doit: Callable[[Config, Session], int | ExitCode | None]
  64. ) -> int | ExitCode:
  65. """Skeleton command line program."""
  66. session = Session.from_config(config)
  67. session.exitstatus = ExitCode.OK
  68. initstate = 0
  69. try:
  70. try:
  71. config._do_configure()
  72. initstate = 1
  73. config.hook.pytest_sessionstart(session=session)
  74. initstate = 2
  75. > session.exitstatus = doit(config, session) or 0
  76. ^^^^^^^^^^^^^^^^^^^^^
  77.  
  78. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:290:
  79. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  80.  
  81. config = <_pytest.config.Config object at 0x000002F4F8906990>, session = <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>
  82.  
  83. def _main(config: Config, session: Session) -> int | ExitCode | None:
  84. """Default command line protocol for initialization, session,
  85. running tests and reporting."""
  86. config.hook.pytest_collection(session=session)
  87. > config.hook.pytest_runtestloop(session=session)
  88.  
  89. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:344:
  90. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  91.  
  92. self = <HookCaller 'pytest_runtestloop'>, kwargs = {'session': <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>}, firstresult = True
  93.  
  94. def __call__(self, **kwargs: object) -> Any:
  95. """Call the hook.
  96.  
  97. Only accepts keyword arguments, which should match the hook
  98. specification.
  99.  
  100. Returns the result(s) of calling all registered plugins, see
  101. :ref:`calling`.
  102. """
  103. assert not self.is_historic(), (
  104. "Cannot directly call a historic hook - use call_historic instead."
  105. )
  106. self._verify_all_args_are_provided(kwargs)
  107. firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
  108. # Copy because plugins may register other plugins during iteration (#438).
  109. > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  110. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  111.  
  112. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
  113. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  114.  
  115. self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_runtestloop'
  116. 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>>]
  117. kwargs = {'session': <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>}, firstresult = True
  118.  
  119. def _hookexec(
  120. self,
  121. hook_name: str,
  122. methods: Sequence[HookImpl],
  123. kwargs: Mapping[str, object],
  124. firstresult: bool,
  125. ) -> object | list[object]:
  126. # called from all hookcaller instances.
  127. # enable_tracing will set its own wrapping function at self._inner_hookexec
  128. > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  129. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  130.  
  131. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
  132. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  133.  
  134. self = <_pytest.logging.LoggingPlugin object at 0x000002F4FA2EE090>, session = <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>
  135.  
  136. @hookimpl(wrapper=True)
  137. def pytest_runtestloop(self, session: Session) -> Generator[None, object, object]:
  138. if session.config.option.collectonly:
  139. return (yield)
  140.  
  141. if self._log_cli_enabled() and self._config.get_verbosity() < 1:
  142. # The verbose flag is needed to avoid messy test progress output.
  143. self._config.option.verbose = 1
  144.  
  145. with catching_logs(self.log_cli_handler, level=self.log_cli_level):
  146. with catching_logs(self.log_file_handler, level=self.log_file_level):
  147. > return (yield) # Run all the tests.
  148. ^^^^^
  149.  
  150. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\logging.py:801:
  151. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  152.  
  153. self = <_pytest.terminal.TerminalReporter object at 0x000002F4F892F590>
  154.  
  155. @hookimpl(wrapper=True)
  156. def pytest_runtestloop(self) -> Generator[None, object, object]:
  157. > result = yield
  158. ^^^^^
  159.  
  160. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\terminal.py:688:
  161. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  162.  
  163. session = <Session exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=3932>
  164.  
  165. def pytest_runtestloop(session: Session) -> bool:
  166. if session.testsfailed and not session.config.option.continue_on_collection_errors:
  167. raise session.Interrupted(
  168. f"{session.testsfailed} error{'s' if session.testsfailed != 1 else ''} during collection"
  169. )
  170.  
  171. if session.config.option.collectonly:
  172. return True
  173.  
  174. for i, item in enumerate(session.items):
  175. nextitem = session.items[i + 1] if i + 1 < len(session.items) else None
  176. > item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  177.  
  178. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:368:
  179. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  180.  
  181. 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
  182.  
  183. def __call__(self, **kwargs: object) -> Any:
  184. """Call the hook.
  185.  
  186. Only accepts keyword arguments, which should match the hook
  187. specification.
  188.  
  189. Returns the result(s) of calling all registered plugins, see
  190. :ref:`calling`.
  191. """
  192. assert not self.is_historic(), (
  193. "Cannot directly call a historic hook - use call_historic instead."
  194. )
  195. self._verify_all_args_are_provided(kwargs)
  196. firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
  197. # Copy because plugins may register other plugins during iteration (#438).
  198. > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  199. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  200.  
  201. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
  202. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  203.  
  204. self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_runtest_protocol'
  205. 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'>>]
  206. kwargs = {'item': <Function test_collect_short_file_windows>, 'nextitem': <Function test_collect_short_file_windows_multi_level_symlink>}, firstresult = True
  207.  
  208. def _hookexec(
  209. self,
  210. hook_name: str,
  211. methods: Sequence[HookImpl],
  212. kwargs: Mapping[str, object],
  213. firstresult: bool,
  214. ) -> object | list[object]:
  215. # called from all hookcaller instances.
  216. # enable_tracing will set its own wrapping function at self._inner_hookexec
  217. > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  218. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  219.  
  220. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
  221. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  222.  
  223. item = <Function test_collect_short_file_windows>
  224.  
  225. @pytest.hookimpl(wrapper=True, tryfirst=True)
  226. def pytest_runtest_protocol(item: Item) -> Generator[None, object, object]:
  227. with catch_warnings_for_item(
  228. config=item.config, ihook=item.ihook, when="runtest", item=item
  229. ):
  230. > return (yield)
  231. ^^^^^
  232.  
  233. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\warnings.py:90:
  234. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  235.  
  236. item = <Function test_collect_short_file_windows>
  237.  
  238. @hookimpl(wrapper=True, tryfirst=True)
  239. def pytest_runtest_protocol(item: Item) -> Generator[None, object, object]:
  240. """Setup the pytest_assertrepr_compare and pytest_assertion_pass hooks.
  241.  
  242. The rewrite module will use util._reprcompare if it exists to use custom
  243. reporting via the pytest_assertrepr_compare hook. This sets up this custom
  244. comparison for the test.
  245. """
  246. ihook = item.ihook
  247.  
  248. def callbinrepr(op, left: object, right: object) -> str | None:
  249. """Call the pytest_assertrepr_compare hook and prepare the result.
  250.  
  251. This uses the first result from the hook and then ensures the
  252. following:
  253. * Overly verbose explanations are truncated unless configured otherwise
  254. (eg. if running in verbose mode).
  255. * Embedded newlines are escaped to help util.format_explanation()
  256. later.
  257. * If the rewrite mode is used embedded %-characters are replaced
  258. to protect later % formatting.
  259.  
  260. The result can be formatted by util.format_explanation() for
  261. pretty printing.
  262. """
  263. hook_result = ihook.pytest_assertrepr_compare(
  264. config=item.config, op=op, left=left, right=right
  265. )
  266. for new_expl in hook_result:
  267. if new_expl:
  268. new_expl = truncate.truncate_if_required(new_expl, item)
  269. new_expl = [line.replace("\n", "\\n") for line in new_expl]
  270. res = "\n~".join(new_expl)
  271. if item.config.getvalue("assertmode") == "rewrite":
  272. res = res.replace("%", "%%")
  273. return res
  274. return None
  275.  
  276. saved_assert_hooks = util._reprcompare, util._assertion_pass
  277. util._reprcompare = callbinrepr
  278. util._config = item.config
  279.  
  280. if ihook.pytest_assertion_pass.get_hookimpls():
  281.  
  282. def call_assertion_pass_hook(lineno: int, orig: str, expl: str) -> None:
  283. ihook.pytest_assertion_pass(item=item, lineno=lineno, orig=orig, expl=expl)
  284.  
  285. util._assertion_pass = call_assertion_pass_hook
  286.  
  287. try:
  288. > return (yield)
  289. ^^^^^
  290.  
  291. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\assertion\__init__.py:192:
  292. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  293.  
  294. item = <Function test_collect_short_file_windows>
  295.  
  296. @hookimpl(wrapper=True)
  297. def pytest_runtest_protocol(item: Item) -> Iterator[None]:
  298. if _get_twisted_version() is TwistedVersion.Version24:
  299. import twisted.python.failure as ut
  300.  
  301. # Monkeypatch `Failure.__init__` to store the raw exception info.
  302. original__init__ = ut.Failure.__init__
  303.  
  304. def store_raw_exception_info(
  305. self, exc_value=None, exc_type=None, exc_tb=None, captureVars=None
  306. ): # pragma: no cover
  307. if exc_value is None:
  308. raw_exc_info = sys.exc_info()
  309. else:
  310. if exc_type is None:
  311. exc_type = type(exc_value)
  312. if exc_tb is None:
  313. exc_tb = sys.exc_info()[2]
  314. raw_exc_info = (exc_type, exc_value, exc_tb)
  315. setattr(self, TWISTED_RAW_EXCINFO_ATTR, tuple(raw_exc_info))
  316. try:
  317. original__init__(
  318. self, exc_value, exc_type, exc_tb, captureVars=captureVars
  319. )
  320. except TypeError: # pragma: no cover
  321. original__init__(self, exc_value, exc_type, exc_tb)
  322.  
  323. with MonkeyPatch.context() as patcher:
  324. patcher.setattr(ut.Failure, "__init__", store_raw_exception_info)
  325. return (yield)
  326. else:
  327. > return (yield)
  328. ^^^^^
  329.  
  330. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\unittest.py:461:
  331. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  332.  
  333. item = <Function test_collect_short_file_windows>
  334.  
  335. @pytest.hookimpl(wrapper=True, trylast=True)
  336. def pytest_runtest_protocol(item: Item) -> Generator[None, object, object]:
  337. timeout = get_timeout_config_value(item.config)
  338. if timeout > 0:
  339. import faulthandler
  340.  
  341. stderr = item.config.stash[fault_handler_stderr_fd_key]
  342. faulthandler.dump_traceback_later(timeout, file=stderr)
  343. try:
  344. return (yield)
  345. finally:
  346. faulthandler.cancel_dump_traceback_later()
  347. else:
  348. > return (yield)
  349. ^^^^^
  350.  
  351. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\faulthandler.py:88:
  352. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  353.  
  354. item = <Function test_collect_short_file_windows>, nextitem = <Function test_collect_short_file_windows_multi_level_symlink>
  355.  
  356. def pytest_runtest_protocol(item: Item, nextitem: Item | None) -> bool:
  357. ihook = item.ihook
  358. ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
  359. > runtestprotocol(item, nextitem=nextitem)
  360.  
  361. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:117:
  362. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  363.  
  364. item = <Function test_collect_short_file_windows>, log = True, nextitem = <Function test_collect_short_file_windows_multi_level_symlink>
  365.  
  366. def runtestprotocol(
  367. item: Item, log: bool = True, nextitem: Item | None = None
  368. ) -> list[TestReport]:
  369. hasrequest = hasattr(item, "_request")
  370. if hasrequest and not item._request: # type: ignore[attr-defined]
  371. # This only happens if the item is re-run, as is done by
  372. # pytest-rerunfailures.
  373. item._initrequest() # type: ignore[attr-defined]
  374. rep = call_and_report(item, "setup", log)
  375. reports = [rep]
  376. if rep.passed:
  377. if item.config.getoption("setupshow", False):
  378. show_test_item(item)
  379. if not item.config.getoption("setuponly", False):
  380. > reports.append(call_and_report(item, "call", log))
  381. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  382.  
  383. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:136:
  384. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  385.  
  386. item = <Function test_collect_short_file_windows>, when = 'call', log = True, kwds = {}, ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x000002F4F8906AD0>
  387. reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
  388.  
  389. def call_and_report(
  390. item: Item, when: Literal["setup", "call", "teardown"], log: bool = True, **kwds
  391. ) -> TestReport:
  392. ihook = item.ihook
  393. if when == "setup":
  394. runtest_hook: Callable[..., None] = ihook.pytest_runtest_setup
  395. elif when == "call":
  396. runtest_hook = ihook.pytest_runtest_call
  397. elif when == "teardown":
  398. runtest_hook = ihook.pytest_runtest_teardown
  399. else:
  400. assert False, f"Unhandled runtest hook case: {when}"
  401. reraise: tuple[type[BaseException], ...] = (Exit,)
  402. if not item.config.getoption("usepdb", False):
  403. reraise += (KeyboardInterrupt,)
  404. > call = CallInfo.from_call(
  405. lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
  406. )
  407.  
  408. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:245:
  409. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  410.  
  411. cls = <class '_pytest.runner.CallInfo'>, func = <function call_and_report.<locals>.<lambda> at 0x000002F4FF889940>, when = 'call', reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
  412.  
  413. @classmethod
  414. def from_call(
  415. cls,
  416. func: Callable[[], TResult],
  417. when: Literal["collect", "setup", "call", "teardown"],
  418. reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
  419. ) -> CallInfo[TResult]:
  420. """Call func, wrapping the result in a CallInfo.
  421.  
  422. :param func:
  423. The function to call. Called without arguments.
  424. :type func: Callable[[], _pytest.runner.TResult]
  425. :param when:
  426. The phase in which the function is called.
  427. :param reraise:
  428. Exception or exceptions that shall propagate if raised by the
  429. function, instead of being wrapped in the CallInfo.
  430. """
  431. excinfo = None
  432. instant = timing.Instant()
  433. try:
  434. > result: TResult | None = func()
  435. ^^^^^^
  436.  
  437. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:344:
  438. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  439.  
  440. > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
  441. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  442. )
  443.  
  444. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:246:
  445. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  446.  
  447. self = <HookCaller 'pytest_runtest_call'>, kwargs = {'item': <Function test_collect_short_file_windows>}, firstresult = False
  448.  
  449. def __call__(self, **kwargs: object) -> Any:
  450. """Call the hook.
  451.  
  452. Only accepts keyword arguments, which should match the hook
  453. specification.
  454.  
  455. Returns the result(s) of calling all registered plugins, see
  456. :ref:`calling`.
  457. """
  458. assert not self.is_historic(), (
  459. "Cannot directly call a historic hook - use call_historic instead."
  460. )
  461. self._verify_all_args_are_provided(kwargs)
  462. firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
  463. # Copy because plugins may register other plugins during iteration (#438).
  464. > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  465. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  466.  
  467. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
  468. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  469.  
  470. self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_runtest_call'
  471. 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>>, ...]
  472. kwargs = {'item': <Function test_collect_short_file_windows>}, firstresult = False
  473.  
  474. def _hookexec(
  475. self,
  476. hook_name: str,
  477. methods: Sequence[HookImpl],
  478. kwargs: Mapping[str, object],
  479. firstresult: bool,
  480. ) -> object | list[object]:
  481. # called from all hookcaller instances.
  482. # enable_tracing will set its own wrapping function at self._inner_hookexec
  483. > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  484. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  485.  
  486. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
  487. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  488.  
  489. self = <_pytest.logging.LoggingPlugin object at 0x000002F4FA2EE090>, item = <Function test_collect_short_file_windows>
  490.  
  491. @hookimpl(wrapper=True)
  492. def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]:
  493. self.log_cli_handler.set_when("call")
  494.  
  495. with self._runtest_for(item, "call"):
  496. > yield
  497.  
  498. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\logging.py:850:
  499. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  500.  
  501. self = <CaptureManager _method='fd' _global_capturing=None _capture_fixture=None>, item = <Function test_collect_short_file_windows>
  502.  
  503. @hookimpl(wrapper=True)
  504. def pytest_runtest_call(self, item: Item) -> Generator[None]:
  505. with self.item_capture("call", item):
  506. > return (yield)
  507. ^^^^^
  508.  
  509. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\capture.py:900:
  510. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  511.  
  512. 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'>>
  513. hook_name = 'pytest_runtest_call', args = [<Function test_collect_short_file_windows>]
  514.  
  515. def run_old_style_hookwrapper(
  516. hook_impl: HookImpl, hook_name: str, args: Sequence[object]
  517. ) -> Teardown:
  518. """
  519. backward compatibility wrapper to run a old style hookwrapper as a wrapper
  520. """
  521.  
  522. teardown: Teardown = cast(Teardown, hook_impl.function(*args))
  523. try:
  524. next(teardown)
  525. except StopIteration:
  526. _raise_wrapfail(teardown, "did not yield")
  527. try:
  528. res = yield
  529. result = Result(res, None)
  530. except BaseException as exc:
  531. result = Result(None, exc)
  532. try:
  533. teardown.send(result)
  534. except StopIteration:
  535. pass
  536. except BaseException as e:
  537. _warn_teardown_exception(hook_name, hook_impl, e)
  538. raise
  539. else:
  540. _raise_wrapfail(teardown, "has second yield")
  541. finally:
  542. teardown.close()
  543. > return result.get_result()
  544. ^^^^^^^^^^^^^^^^^^^
  545.  
  546. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_callers.py:53:
  547. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  548.  
  549. 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'>>
  550. hook_name = 'pytest_runtest_call', args = [<Function test_collect_short_file_windows>]
  551.  
  552. def run_old_style_hookwrapper(
  553. hook_impl: HookImpl, hook_name: str, args: Sequence[object]
  554. ) -> Teardown:
  555. """
  556. backward compatibility wrapper to run a old style hookwrapper as a wrapper
  557. """
  558.  
  559. teardown: Teardown = cast(Teardown, hook_impl.function(*args))
  560. try:
  561. next(teardown)
  562. except StopIteration:
  563. _raise_wrapfail(teardown, "did not yield")
  564. try:
  565. > res = yield
  566. ^^^^^
  567.  
  568. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_callers.py:38:
  569. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  570.  
  571. item = <Function test_collect_short_file_windows>
  572.  
  573. @hookimpl(wrapper=True)
  574. def pytest_runtest_call(item: Item) -> Generator[None]:
  575. xfailed = item.stash.get(xfailed_key, None)
  576. if xfailed is None:
  577. item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item)
  578.  
  579. if xfailed and not item.config.option.runxfail and not xfailed.run:
  580. xfail("[NOTRUN] " + xfailed.reason)
  581.  
  582. try:
  583. > return (yield)
  584. ^^^^^
  585.  
  586. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\skipping.py:262:
  587. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  588.  
  589. item = <Function test_collect_short_file_windows>
  590.  
  591. def pytest_runtest_call(item: Item) -> None:
  592. _update_current_test_var(item, "call")
  593. try:
  594. del sys.last_type
  595. del sys.last_value
  596. del sys.last_traceback
  597. if sys.version_info >= (3, 12, 0):
  598. del sys.last_exc # type:ignore[attr-defined]
  599. except AttributeError:
  600. pass
  601. try:
  602. > item.runtest()
  603.  
  604. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\runner.py:178:
  605. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  606.  
  607. self = <Function test_collect_short_file_windows>
  608.  
  609. def runtest(self) -> None:
  610. """Execute the underlying test function."""
  611. > self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  612.  
  613. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\python.py:1673:
  614. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  615.  
  616. self = <HookCaller 'pytest_pyfunc_call'>, kwargs = {'pyfuncitem': <Function test_collect_short_file_windows>}, firstresult = True
  617.  
  618. def __call__(self, **kwargs: object) -> Any:
  619. """Call the hook.
  620.  
  621. Only accepts keyword arguments, which should match the hook
  622. specification.
  623.  
  624. Returns the result(s) of calling all registered plugins, see
  625. :ref:`calling`.
  626. """
  627. assert not self.is_historic(), (
  628. "Cannot directly call a historic hook - use call_historic instead."
  629. )
  630. self._verify_all_args_are_provided(kwargs)
  631. firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
  632. # Copy because plugins may register other plugins during iteration (#438).
  633. > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  634. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  635.  
  636. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
  637. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  638.  
  639. self = <_pytest.config.PytestPluginManager object at 0x000002F4F76FFFD0>, hook_name = 'pytest_pyfunc_call'
  640. 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'>>]
  641. kwargs = {'pyfuncitem': <Function test_collect_short_file_windows>}, firstresult = True
  642.  
  643. def _hookexec(
  644. self,
  645. hook_name: str,
  646. methods: Sequence[HookImpl],
  647. kwargs: Mapping[str, object],
  648. firstresult: bool,
  649. ) -> object | list[object]:
  650. # called from all hookcaller instances.
  651. # enable_tracing will set its own wrapping function at self._inner_hookexec
  652. > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  653. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  654.  
  655. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
  656. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  657.  
  658. pyfuncitem = <Function test_collect_short_file_windows>
  659.  
  660. @hookimpl(trylast=True)
  661. def pytest_pyfunc_call(pyfuncitem: Function) -> object | None:
  662. testfunction = pyfuncitem.obj
  663. if is_async_function(testfunction):
  664. async_fail(pyfuncitem.nodeid)
  665. funcargs = pyfuncitem.funcargs
  666. testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
  667. > result = testfunction(**testargs)
  668. ^^^^^^^^^^^^^^^^^^^^^^^^
  669.  
  670. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\python.py:157:
  671. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  672.  
  673. pytester = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>
  674.  
  675. @pytest.mark.skipif(not sys.platform.startswith("win"), reason="Windows only")
  676. def test_collect_short_file_windows(pytester: Pytester) -> None:
  677. """Reproducer for #11895: short paths not collected on Windows."""
  678. short_path = tempfile.mkdtemp()
  679. if "~" not in short_path: # pragma: no cover
  680. if running_on_ci():
  681. # On CI, we are expecting that under the current GitHub actions configuration,
  682. # tempfile.mkdtemp() is producing short paths, so we want to fail to prevent
  683. # this from silently changing without us noticing.
  684. pytest.fail(
  685. f"tempfile.mkdtemp() failed to produce a short path on CI: {short_path}"
  686. )
  687. else:
  688. # We want to skip failing this test locally in this situation because
  689. # depending on the local configuration tempfile.mkdtemp() might not produce a short path:
  690. # For example, user might have configured %TEMP% exactly to avoid generating short paths.
  691. pytest.skip(
  692. f"tempfile.mkdtemp() failed to produce a short path: {short_path}, skipping"
  693. )
  694.  
  695. test_file = Path(short_path).joinpath("test_collect_short_file_windows.py")
  696. test_file.write_text("def test(): pass", encoding="UTF-8")
  697. > result = pytester.runpytest(short_path)
  698. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  699.  
  700. ..\..\..\..\..\..\source\macdjord\pytest.git\testing\test_collection.py:1779:
  701. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  702.  
  703. 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 = {}
  704. 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']
  705.  
  706. def runpytest(self, *args: str | os.PathLike[str], **kwargs: Any) -> RunResult:
  707. """Run pytest inline or in a subprocess, depending on the command line
  708. option "--runpytest" and return a :py:class:`~pytest.RunResult`."""
  709. new_args = self._ensure_basetemp(args)
  710. if self._method == "inprocess":
  711. > return self.runpytest_inprocess(*new_args, **kwargs)
  712. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  713.  
  714. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\pytester.py:1202:
  715. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  716.  
  717. self = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>
  718. 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
  719. instant = Instant(time=1759274381.204302, perf_count=523254.6523219)
  720. 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>
  721. 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%]'
  722. err = ''
  723.  
  724. def runpytest_inprocess(
  725. self, *args: str | os.PathLike[str], **kwargs: Any
  726. ) -> RunResult:
  727. """Return result of running pytest in-process, providing a similar
  728. interface to what self.runpytest() provides."""
  729. syspathinsert = kwargs.pop("syspathinsert", False)
  730.  
  731. if syspathinsert:
  732. self.syspathinsert()
  733. instant = timing.Instant()
  734. capture = _get_multicapture("sys")
  735. capture.start_capturing()
  736. try:
  737. try:
  738. > reprec = self.inline_run(*args, **kwargs)
  739. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  740.  
  741. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\pytester.py:1167:
  742. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  743.  
  744. self = <Pytester WindowsPath('C:/Users/jordan.macdonald/AppData/Local/Temp/pytest-of-unknown/pytest-11/test_collect_short_file_windows0')>
  745. plugins = [<_pytest.pytester.Pytester.inline_run.<locals>.PytesterHelperPlugin object at 0x000002F4FFDC9F50>], no_reraise_ctrlc = False
  746. args = ('C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5', '--basetemp=C:\\Users\\jordan.macdonald\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-11\\basetemp')
  747. finalizers = [<bound method SysModulesSnapshot.restore of <_pytest.pytester.SysModulesSnapshot object at 0x000002F4FFDC99D0>>, <bound method SysPathsSnapshot.restore of <_pytest.pytester.SysPathsSnapshot object at 0x000002F4FFDC8BD0>>]
  748.  
  749. def inline_run(
  750. self,
  751. *args: str | os.PathLike[str],
  752. plugins=(),
  753. no_reraise_ctrlc: bool = False,
  754. ) -> HookRecorder:
  755. """Run ``pytest.main()`` in-process, returning a HookRecorder.
  756.  
  757. Runs the :py:func:`pytest.main` function to run all of pytest inside
  758. the test process itself. This means it can return a
  759. :py:class:`HookRecorder` instance which gives more detailed results
  760. from that run than can be done by matching stdout/stderr from
  761. :py:meth:`runpytest`.
  762.  
  763. :param args:
  764. Command line arguments to pass to :py:func:`pytest.main`.
  765. :param plugins:
  766. Extra plugin instances the ``pytest.main()`` instance should use.
  767. :param no_reraise_ctrlc:
  768. Typically we reraise keyboard interrupts from the child run. If
  769. True, the KeyboardInterrupt exception is captured.
  770. """
  771. from _pytest.unraisableexception import gc_collect_iterations_key
  772.  
  773. # (maybe a cpython bug?) the importlib cache sometimes isn't updated
  774. # properly between file creation and inline_run (especially if imports
  775. # are interspersed with file creation)
  776. importlib.invalidate_caches()
  777.  
  778. plugins = list(plugins)
  779. finalizers = []
  780. try:
  781. # Any sys.module or sys.path changes done while running pytest
  782. # inline should be reverted after the test run completes to avoid
  783. # clashing with later inline tests run within the same pytest test,
  784. # e.g. just because they use matching test module names.
  785. finalizers.append(self.__take_sys_modules_snapshot().restore)
  786. finalizers.append(SysPathsSnapshot().restore)
  787.  
  788. # Important note:
  789. # - our tests should not leave any other references/registrations
  790. # laying around other than possibly loaded test modules
  791. # referenced from sys.modules, as nothing will clean those up
  792. # automatically
  793.  
  794. rec = []
  795.  
  796. class PytesterHelperPlugin:
  797. @staticmethod
  798. def pytest_configure(config: Config) -> None:
  799. rec.append(self.make_hook_recorder(config.pluginmanager))
  800.  
  801. # The unraisable plugin GC collect slows down inline
  802. # pytester runs too much.
  803. config.stash[gc_collect_iterations_key] = 0
  804.  
  805. plugins.append(PytesterHelperPlugin())
  806. > ret = main([str(x) for x in args], plugins=plugins)
  807. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  808.  
  809. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\pytester.py:1132:
  810. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  811.  
  812. args = ['C:\\Users\\JORDAN~1.MAC\\AppData\\Local\\Temp\\tmpsb2856z5', '--basetemp=C:\\Users\\jordan.macdonald\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-11\\basetemp']
  813. plugins = [<_pytest.pytester.Pytester.inline_run.<locals>.PytesterHelperPlugin object at 0x000002F4FFDC9F50>]
  814.  
  815. def main(
  816. args: list[str] | os.PathLike[str] | None = None,
  817. plugins: Sequence[str | _PluggyPlugin] | None = None,
  818. ) -> int | ExitCode:
  819. """Perform an in-process test run.
  820.  
  821. :param args:
  822. List of command line arguments. If `None` or not given, defaults to reading
  823. arguments directly from the process command line (:data:`sys.argv`).
  824. :param plugins: List of plugin objects to be auto-registered during initialization.
  825.  
  826. :returns: An exit code.
  827. """
  828. old_pytest_version = os.environ.get("PYTEST_VERSION")
  829. try:
  830. os.environ["PYTEST_VERSION"] = __version__
  831. try:
  832. config = _prepareconfig(args, plugins)
  833. except ConftestImportFailure as e:
  834. exc_info = ExceptionInfo.from_exception(e.cause)
  835. tw = TerminalWriter(sys.stderr)
  836. tw.line(f"ImportError while loading conftest '{e.path}'.", red=True)
  837. exc_info.traceback = exc_info.traceback.filter(
  838. filter_traceback_for_conftest_import_failure
  839. )
  840. exc_repr = (
  841. exc_info.getrepr(style="short", chain=False)
  842. if exc_info.traceback
  843. else exc_info.exconly()
  844. )
  845. formatted_tb = str(exc_repr)
  846. for line in formatted_tb.splitlines():
  847. tw.line(line.rstrip(), red=True)
  848. return ExitCode.USAGE_ERROR
  849. else:
  850. try:
  851. > ret: ExitCode | int = config.hook.pytest_cmdline_main(config=config)
  852. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  853.  
  854. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\config\__init__.py:175:
  855. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  856.  
  857. self = <HookCaller 'pytest_cmdline_main'>, kwargs = {'config': <_pytest.config.Config object at 0x000002F4FEA50310>}, firstresult = True
  858.  
  859. def __call__(self, **kwargs: object) -> Any:
  860. """Call the hook.
  861.  
  862. Only accepts keyword arguments, which should match the hook
  863. specification.
  864.  
  865. Returns the result(s) of calling all registered plugins, see
  866. :ref:`calling`.
  867. """
  868. assert not self.is_historic(), (
  869. "Cannot directly call a historic hook - use call_historic instead."
  870. )
  871. self._verify_all_args_are_provided(kwargs)
  872. firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
  873. # Copy because plugins may register other plugins during iteration (#438).
  874. > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  875. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  876.  
  877. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
  878. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  879.  
  880. self = <_pytest.config.PytestPluginManager object at 0x000002F4FFDCB750>, hook_name = 'pytest_cmdline_main'
  881. 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'>>, ...]
  882. kwargs = {'config': <_pytest.config.Config object at 0x000002F4FEA50310>}, firstresult = True
  883.  
  884. def _hookexec(
  885. self,
  886. hook_name: str,
  887. methods: Sequence[HookImpl],
  888. kwargs: Mapping[str, object],
  889. firstresult: bool,
  890. ) -> object | list[object]:
  891. # called from all hookcaller instances.
  892. # enable_tracing will set its own wrapping function at self._inner_hookexec
  893. > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  894. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  895.  
  896. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
  897. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  898.  
  899. config = <_pytest.config.Config object at 0x000002F4FEA50310>
  900.  
  901. def pytest_cmdline_main(config: Config) -> int | ExitCode:
  902. > return wrap_session(config, _main)
  903. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  904.  
  905. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:337:
  906. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  907.  
  908. config = <_pytest.config.Config object at 0x000002F4FEA50310>, doit = <function _main at 0x000002F4F86D2980>
  909.  
  910. def wrap_session(
  911. config: Config, doit: Callable[[Config, Session], int | ExitCode | None]
  912. ) -> int | ExitCode:
  913. """Skeleton command line program."""
  914. session = Session.from_config(config)
  915. session.exitstatus = ExitCode.OK
  916. initstate = 0
  917. try:
  918. try:
  919. config._do_configure()
  920. initstate = 1
  921. config.hook.pytest_sessionstart(session=session)
  922. initstate = 2
  923. session.exitstatus = doit(config, session) or 0
  924. except UsageError:
  925. session.exitstatus = ExitCode.USAGE_ERROR
  926. raise
  927. except Failed:
  928. session.exitstatus = ExitCode.TESTS_FAILED
  929. except (KeyboardInterrupt, exit.Exception):
  930. excinfo = _pytest._code.ExceptionInfo.from_current()
  931. exitstatus: int | ExitCode = ExitCode.INTERRUPTED
  932. if isinstance(excinfo.value, exit.Exception):
  933. if excinfo.value.returncode is not None:
  934. exitstatus = excinfo.value.returncode
  935. if initstate < 2:
  936. sys.stderr.write(f"{excinfo.typename}: {excinfo.value.msg}\n")
  937. config.hook.pytest_keyboard_interrupt(excinfo=excinfo)
  938. session.exitstatus = exitstatus
  939. except BaseException:
  940. session.exitstatus = ExitCode.INTERNAL_ERROR
  941. excinfo = _pytest._code.ExceptionInfo.from_current()
  942. try:
  943. config.notify_exception(excinfo, config.option)
  944. except exit.Exception as exc:
  945. if exc.returncode is not None:
  946. session.exitstatus = exc.returncode
  947. sys.stderr.write(f"{type(exc).__name__}: {exc}\n")
  948. else:
  949. if isinstance(excinfo.value, SystemExit):
  950. sys.stderr.write("mainloop: caught unexpected SystemExit!\n")
  951.  
  952. finally:
  953. # Explicitly break reference cycle.
  954. excinfo = None # type: ignore
  955. os.chdir(session.startpath)
  956. if initstate >= 2:
  957. try:
  958. > config.hook.pytest_sessionfinish(
  959. session=session, exitstatus=session.exitstatus
  960. )
  961.  
  962. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\main.py:325:
  963. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  964.  
  965. self = <HookCaller 'pytest_sessionfinish'>, kwargs = {'exitstatus': 0, 'session': <Session exitstatus=0 testsfailed=0 testscollected=1>}, firstresult = False
  966.  
  967. def __call__(self, **kwargs: object) -> Any:
  968. """Call the hook.
  969.  
  970. Only accepts keyword arguments, which should match the hook
  971. specification.
  972.  
  973. Returns the result(s) of calling all registered plugins, see
  974. :ref:`calling`.
  975. """
  976. assert not self.is_historic(), (
  977. "Cannot directly call a historic hook - use call_historic instead."
  978. )
  979. self._verify_all_args_are_provided(kwargs)
  980. firstresult = self.spec.opts.get("firstresult", False) if self.spec else False
  981. # Copy because plugins may register other plugins during iteration (#438).
  982. > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  983. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  984.  
  985. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_hooks.py:512:
  986. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  987.  
  988. self = <_pytest.config.PytestPluginManager object at 0x000002F4FFDCB750>, hook_name = 'pytest_sessionfinish'
  989. 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>>, ...]
  990. kwargs = {'exitstatus': 0, 'session': <Session exitstatus=0 testsfailed=0 testscollected=1>}, firstresult = False
  991.  
  992. def _hookexec(
  993. self,
  994. hook_name: str,
  995. methods: Sequence[HookImpl],
  996. kwargs: Mapping[str, object],
  997. firstresult: bool,
  998. ) -> object | list[object]:
  999. # called from all hookcaller instances.
  1000. # enable_tracing will set its own wrapping function at self._inner_hookexec
  1001. > return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  1002. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1003.  
  1004. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:120:
  1005. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1006.  
  1007. hook_name = 'pytest_sessionfinish'
  1008. 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>>, ...]
  1009. caller_kwargs = {'exitstatus': 0, 'session': <Session exitstatus=0 testsfailed=0 testscollected=1>}, firstresult = False
  1010.  
  1011. def traced_hookexec(
  1012. hook_name: str,
  1013. hook_impls: Sequence[HookImpl],
  1014. caller_kwargs: Mapping[str, object],
  1015. firstresult: bool,
  1016. ) -> object | list[object]:
  1017. before(hook_name, hook_impls, caller_kwargs)
  1018. outcome = Result.from_call(
  1019. lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)
  1020. )
  1021. after(outcome, hook_name, hook_impls, caller_kwargs)
  1022. > return outcome.get_result()
  1023. ^^^^^^^^^^^^^^^^^^^^
  1024.  
  1025. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:475:
  1026. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1027.  
  1028. > lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)
  1029. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1030. )
  1031.  
  1032. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\pluggy\_manager.py:472:
  1033. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1034.  
  1035. self = <_pytest.logging.LoggingPlugin object at 0x000002F4FFD1A950>
  1036.  
  1037. @hookimpl(wrapper=True, tryfirst=True)
  1038. def pytest_sessionfinish(self) -> Generator[None]:
  1039. self.log_cli_handler.set_when("sessionfinish")
  1040.  
  1041. with catching_logs(self.log_cli_handler, level=self.log_cli_level):
  1042. with catching_logs(self.log_file_handler, level=self.log_file_level):
  1043. > return (yield)
  1044. ^^^^^
  1045.  
  1046. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\logging.py:873:
  1047. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1048.  
  1049. self = <_pytest.terminal.TerminalReporter object at 0x000002F4FFE5FAD0>, session = <Session exitstatus=0 testsfailed=0 testscollected=1>, exitstatus = 0
  1050.  
  1051. @hookimpl(wrapper=True)
  1052. def pytest_sessionfinish(
  1053. self, session: Session, exitstatus: int | ExitCode
  1054. ) -> Generator[None]:
  1055. > result = yield
  1056. ^^^^^
  1057.  
  1058. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\terminal.py:936:
  1059. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1060.  
  1061. session = <Session exitstatus=0 testsfailed=0 testscollected=1>
  1062.  
  1063. @pytest.hookimpl(wrapper=True)
  1064. def pytest_sessionfinish(session: Session) -> Generator[None]:
  1065. config = session.config
  1066. with catch_warnings_for_item(
  1067. config=config, ihook=config.hook, when="config", item=None
  1068. ):
  1069. > return (yield)
  1070. ^^^^^
  1071.  
  1072. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\warnings.py:119:
  1073. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1074.  
  1075. self = <_pytest.cacheprovider.NFPlugin object at 0x000002F4FFE5DFD0>
  1076.  
  1077. def pytest_sessionfinish(self) -> None:
  1078. config = self.config
  1079. if config.getoption("cacheshow") or hasattr(config, "workerinput"):
  1080. return
  1081.  
  1082. if config.getoption("collectonly"):
  1083. return
  1084.  
  1085. assert config.cache is not None
  1086. > config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
  1087.  
  1088. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:475:
  1089. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1090.  
  1091. self = Cache(), key = 'cache/nodeids', value = ['jordan.macdonald/AppData/Local/Temp/tmpsb2856z5/test_collect_short_file_windows.py::test']
  1092.  
  1093. def set(self, key: str, value: object) -> None:
  1094. """Save value for the given key.
  1095.  
  1096. :param key:
  1097. Must be a ``/`` separated value. Usually the first
  1098. name is the name of your plugin or your application.
  1099. :param value:
  1100. Must be of any combination of basic python types,
  1101. including nested types like lists of dictionaries.
  1102. """
  1103. path = self._getvaluepath(key)
  1104. try:
  1105. > self._mkdir(path.parent)
  1106.  
  1107. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:184:
  1108. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1109.  
  1110. self = Cache(), path = WindowsPath('C:/Users/.pytest_cache/v/cache')
  1111.  
  1112. def _mkdir(self, path: Path) -> None:
  1113. > self._ensure_cache_dir_and_supporting_files()
  1114.  
  1115. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:126:
  1116. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1117.  
  1118. self = Cache()
  1119.  
  1120. def _ensure_cache_dir_and_supporting_files(self) -> None:
  1121. """Create the cache dir and its supporting files."""
  1122. if self._cachedir.is_dir():
  1123. return
  1124.  
  1125. self._cachedir.parent.mkdir(parents=True, exist_ok=True)
  1126. > with tempfile.TemporaryDirectory(
  1127. prefix="pytest-cache-files-",
  1128. dir=self._cachedir.parent,
  1129. ) as newpath:
  1130.  
  1131. ..\..\..\..\..\..\source\macdjord\pytest.git\.tox\py311\Lib\site-packages\_pytest\cacheprovider.py:209:
  1132. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1133.  
  1134. 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')
  1135. ignore_cleanup_errors = False
  1136.  
  1137. def __init__(self, suffix=None, prefix=None, dir=None,
  1138. ignore_cleanup_errors=False):
  1139. > self.name = mkdtemp(suffix, prefix, dir)
  1140. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1141.  
  1142. C:\Python311\Lib\tempfile.py:854:
  1143. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1144.  
  1145. suffix = '', prefix = 'pytest-cache-files-', dir = WindowsPath('C:/Users')
  1146.  
  1147. def mkdtemp(suffix=None, prefix=None, dir=None):
  1148. """User-callable function to create and return a unique temporary
  1149. directory. The return value is the pathname of the directory.
  1150.  
  1151. Arguments are as for mkstemp, except that the 'text' argument is
  1152. not accepted.
  1153.  
  1154. The directory is readable, writable, and searchable only by the
  1155. creating user.
  1156.  
  1157. Caller is responsible for deleting the directory when done with it.
  1158. """
  1159.  
  1160. prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  1161.  
  1162. names = _get_candidate_names()
  1163. if output_type is bytes:
  1164. names = map(_os.fsencode, names)
  1165.  
  1166. for seq in range(TMP_MAX):
  1167. name = next(names)
  1168. file = _os.path.join(dir, prefix + name + suffix)
  1169. _sys.audit("tempfile.mkdtemp", file)
  1170. try:
  1171. _os.mkdir(file, 0o700)
  1172. except FileExistsError:
  1173. continue # try again
  1174. except PermissionError:
  1175. # This exception is thrown when a directory with the chosen name
  1176. # already exists on windows.
  1177. > if (_os.name == 'nt' and _os.path.isdir(dir) and
  1178. ^^^^^^^^^^^^^^^^^^^
  1179. _os.access(dir, _os.W_OK)):
  1180.  
  1181. C:\Python311\Lib\tempfile.py:374:
  1182. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1183.  
  1184. s = WindowsPath('C:/Users')
  1185.  
  1186. > ???
  1187. E KeyboardInterrupt
  1188.  
  1189. <frozen genericpath>:39: KeyboardInterrupt
  1190. =============================================================================== 2274 passed, 105 skipped, 6 xfailed, 1 xpassed in 231.42s (0:03:51) ===============================================================================
  1191. py311: exit 2 (236.50 seconds) C:\Users\jordan.macdonald\source\macdjord\pytest.git> pytest -v --full-trace pid=26888
  1192. ROOT: [30252] KeyboardInterrupt - teardown started
  1193. py311: FAIL code 2 (256.77=setup[20.27]+cmd[236.50] seconds)
  1194. evaluation failed :( (257.41 seconds)
Add Comment
Please, Sign In to add comment