Testing with pytest always issues a file not found error
See original GitHub issueWhenever I run the tests, I always getting this strange error:
Detail: Unable to read file (Error: File not found
I really don’t have a c
file in my project. But where is it coming from?
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
FileNotFoundError when using python -m pytest vs. pytest
When I launch my virtual environment I am sitting at the root of this directory structure. I run my tests by issuing this...
Read more >ERROR: file or directory not found: tests/* - Atlassian Community
The error indicates that the tests folder does not exist in the repository. The pytest command expects to find files with tests in...
Read more >Python Testing with pytest, Second Edition: File not Found ...
I ran this command after installing the sample application: $ cards add do something --owner Brian. And got a file not found error:....
Read more >Basic patterns and examples — pytest documentation
Sometimes a test session might get stuck and there might be no easy way to figure out which test got stuck, for example...
Read more >Effective Python Testing With Pytest
To follow along with some of the examples in this tutorial, you'll need to install pytest . As most Python packages, pytest is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure if it the same bug or not. Getting
File not found
on Mac OS for pytest when click on shadedRun Test
above the test. The file and the test obviously exist. Error is below.@luabud I can confirm that if test directory contains an
pytest.ini
, and file path for the files in the test directory are being incorrectly calculated while running tests.For eg. Expected path:
c:\Users\luabud\Apps\vscode\tests\two\test_d.py
Actual path:c:\Users\luabud\Apps\vscode\two\test_d.py