Not sure how to run Python tests
See original GitHub issueI tried the following on a newly generated project:
pip install -e ".[test, examples]"
py.test
But got this error:
ERROR: usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: --nbval --current-env
I’m fairly new to the wider Python ecosystem so I may just not understand how pytest or whatever is used here is supposed to work?
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Running and Writing Tests - Python Developer's Guide
Running : The shortest, simplest way of running the test suite is the following command from the root directory of your checkout (after...
Read more >How do I run all Python unit tests in a directory? - Stack Overflow
The names of all test files and test methods should start with "test_". Otherwise the command "Run as -> Python unit test" wont...
Read more >Run Python tests | IntelliJ IDEA Documentation - JetBrains
Run all Python tests in a directory. In the Project tool window, select the directory that contains tests to be executed.
Read more >Unit Testing with Python unittest Module - Geekflare
The command to run the tests using the discover method is python -m unittest discover . The command will detect all the files...
Read more >Python Tutorial: How to run Unit Test | Part 1 | Step by Step
0:00 - Intro to Unit Tests in Python ; 1:34 - Print Statement is not very good ; 2:10 - Step 1. Create...
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
BTW I found why the notebooks were getting executed: the cookiecutter includes the nbval library which does exactly that.
https://pypi.org/project/nbval/
Thanks, maybe it is and maybe I can ditch the shitty pipenv system if this is better.