We don't have a tox.ini
file and it may be necessary. From what I've been able to find out online:
- The
setup.cfg
andsetup.py
files are for building distributions. - The
tox.ini
file is for running tests in virtual environments that are created on-the-fly.
In reference to the official AutoKey documentation at https://autokey.github.io/autokey/ Silico_Biomancer (AKA BlueDrink9) said: Iirc on the branch with the docs changes, if you run something like tox -e docs
it should re-generate the files. Should be documented, but probably only on that branch's readme or CONTRIBUTORS.rst
atm
tox -e py
- (Optional) Boot into the virtual machine.
- Grab all available operating-system updates.
- Update the apt database:
sudo apt update
- Install pip3:
sudo apt install python3-pip
- Install tkinter:
sudo apt install python3-tk
- Install tox:
sudo apt install tox
- Create a GitHub personal access token.
- Configure your git username by replacing John with your username:
git config --global user.name "John"
- Configure your git user email by replacing John Doe's email address with yours:
git config --global user.email "[email protected]"
- (Optional) Configure your editor as nano instead of the default of vim:
git config --global core.editor "nano"
- (Optional) Configure your pushes to tracking so that they'll go wherever they're being tracked to go automatically based on your clone command:
git config push.default tracking
GitHub Actions can be run locally inside of your virtual machine:
- Open the virtual machine.
- Open the clone's directory in a terminal window.
- Choose a testing command to run:
- Run all tests for all platforms in all environments:
tox
- Run all tests for all platforms in the environment that tox is installed in:
tox -e test
- Run all tests for all platforms in all environments, recreating the virtual environments first:
tox -r
- Run all tests for all platforms in all environments, recreating the virtual environments first:
tox --recreate
- Run all tests for the specified platform in the specified environment:
tox -e py37-test
- Run all tests for the specified platforms in the specified environments:
tox -e 'py3{7,11}'-test
- Run all tests for all platforms iusing the version of Python in PATH:
tox -e py
- Run all tests for the specified platform in all environments:
tox -e py37
- Run individual tests on specified files that start with
test_
:- Run an individual test on the specified file:
tox -- tests/test_common.py
- Run an individual test on the specified file:
tox -- tests/test_configmanager.py
- Run an individual test on the specified file:
tox -- tests/test_iomediator.py
- Run an individual test on the specified file:
tox -- tests/test_macro.py
- Run an individual test on the specified file:
tox -- tests/test_phrase.py
- Run an individual test on the specified file:
tox -- tests/test_phrase_runner.py
- Run an individual test on the specified file:
- Run a lint test:
tox -e lint
- Run the clean, coverage, and report tests:
tox -e clean,coverage,report
- Run all tests for all platforms in all environments:
When interpreting the test results, note that tests can be marked by the developers with skip
or xfail
if they're expected to fail for some reason, as they might with a feature not implemented yet or a bug not fixed yet.
- Marking a test with
skip
will prevent that test from being run at all. - Marking a test with
xfail
will run that test so you can check if it fails or not.
- SKIPPED means that a test marked with
skip
wasn't tested, as expected. - XFAIL means that a test marked with
xfail
failed, as expected. - XPASS means that a test marked with
xfail
passed.
https://docs.pytest.org/en/stable/reference/reference.html#exitcode