Running Tests - dlk3/autokey GitHub Wiki
Running unit tests
The unit test suite has two additional requirements:
- Pytest - PyPi
- PyHamcrest - PyPi
Running the test suite is integrated into setup.py. The tests can be run by executing python3 setup.py test from the repository root directory.
Trying out a clone of AutoKey
You can try out the code by cloning it and testing it locally on your machine without having to install it. This is a great way to help the developers when they've created new features or fixed issues and would like feedback from users. It's also a great way to test out your own code if you'd like to do some AutoKey developing of your own.
- Prepare your system before cloning:
- Important - Make sure that AutoKey is or was installed on your computer (from your distribution's package manager, etc.) so that you'll already have all of its dependencies.
- Optional - Configure git on your system:
- 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]" - Configure your editor as nano instead of the default of vim:
git config --global core.editor "nano" - Configure your pushes to tracking so that they'll go wherever they're being automatically tracked to go:
git config push.default tracking
- Configure your git username by replacing John with your username:
- Clone the repository:
- Open a terminal window on your computer in the directory in which you'd like to create the clone's subdirectory.
- Clone the repository with this command:
git clone https://github.com/dlk3/autokey.git
- Run the clone:
- Run the clone manually:
- Change to the autokey directory that you just created:
cd autokey - Change to the /lib directory:
cd lib - Run the AutoKey module in either GTK or Qt mode:
- AutoKey GTK:
python3 -m autokey.gtkui - AutoKey Qt:
python3 -m autokey.qtui
- AutoKey GTK:
- Change to the autokey directory that you just created:
- Run the clone from anywhere by replacing the example
~/Desktop/autokeypath with the path to your clone:- AutoKey GTK:
cd ~/Desktop/autokey; cd lib; python3 -m autokey.gtkui - AutoKey Qt:
cd ~/Desktop/autokey; cd lib; python3 -m autokey.qtui - Note that command-line options (like
-ccan be added to the end of any of those AutoKey commands.
- AutoKey GTK:
- Run the clone manually:
- When you're finished testing either of those clones, close AutoKey normally.
- If you're finished with all of your testing and would like to get rid of the clone, delete the clone's directory. Otherwise, you can keep it and use these steps again for further testing another time.