pytest 一直为我工作。今天重启后,出现这个错误:
PS C:\> pytest
================================================= test session starts =================================================
platform win32 -- Python 3.9.1, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: C:\
plugins: forked-1.3.0, html-3.1.1, metadata-1.11.0, xdist-2.2.0
collected 0 items
================================================ no tests ran in 0.01s ================================================
ERROR: file or directory not found: and
Run Code Online (Sandbox Code Playgroud)
我是在有效的 pytest 框架中运行还是在框架之外运行并不重要。我卸载了 pytest 和 python,然后重新安装,结果相同。我尝试运行“python -m pytest”并得到相同的结果。我运行的是 Windows 10、python 3.8 或 3.9。我缺少什么?
这是使用调试标志的一些附加输出
PS C:\> mkdir empty_directory
Directory: C:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 1/14/2021 8:23 PM empty_directory
PS C:\> cd empty_directory
PS …Run Code Online (Sandbox Code Playgroud)