Table of contents
Make sure that, on your machine or on your virtual environment:
- Tests are running successfully with unittest before installing YourBase Test Acceleration.
- YourBase Test Acceleration is installed.
- Git is installed.
tests/__init__.py file, copy-paste the following:
import unittest import yourbase yourbase.attach(unittest)
For example, to run all the tests for the project, use:
python -m unittest discover
Note: If your tests are going to take a while to run, you can run just a subset of your tests. Running a subset of tests will create a dependency graph just for those tests, so you can see YourBase Test Acceleration in action more quickly.
Without making a code change, run your tests again using the same command as in step #2. You’ll see that no tests are run. Here, since no code was changed, YourBase Test acceleration ensures that no tests are run.
You can simply add a print statement like below:
print(“Checking YourBase Test Acceleration after a code-change...”)
Use the same command as in step #2 to run your tests. Here, YourBase Test acceleration ensures that only the one test that you modified is run.