bash
pytest -s tests/test_logging.py
To send test results to JUnit format output:
bash
py.test tests --junitxml=result.xml
Color control
To have no color (e.g., yellow on white background is not readable):
bash
pytest --color=no tests/test_logging.py
Sending test report to online pastebin service
Creating a URL for each test failure:
bash
pytest --pastebin=failed tests/test_logging.py
This will submit test run information to a remote Paste service and provide a URL for each failure. You may select
tests as usual or add for example -x if you only want to send one particular failure.
Creating a URL for a whole test session log:
bash
pytest --pastebin=all tests/test_logging.py
Writing tests
🤗 transformers tests are based on unittest, but run by pytest, so most of the time features from both systems
