pip3 install -r requirements.txt
Official pytest-documentation
pytest # run tests with minimal output
pytest -v # run tests, listing name of all tests
pytest -v -s # run tests, listing name of all tests, and show stdout
If a previously green test starts failing during "red", i.e. working to make a new test pass, comment out the new test and do the refactoring needed. This to avoid refactoring and adding new functinality at the same time.
@pytest.mark.skip(reason="new test disabled during refactoring")
This project uses black to format code and flake8 for linting.
Format all files using command-line:
black <directory>
Lint all files:
flake8 --ignore=E203,E501
VSCode:
- install VSCode extension Python: Black
- shift+alt+f => format code
.vscode/settings.json
file contains VSCode settings for black and flake8- black autoformat on save
- flake8 linting ("problems" tab and squiggly lines)
Socratica youtube-video on python exceptions.