-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amend Al's tests so that they run under Travis CI
We actively advertise that easygui has few dependencies. * switch pytest -> unittest in order to reduce dependences * refactor to work with unittest (no parametrize, must derive from unittest.TestCase class) And also: * add init file so that the tests get discovered by unittest * add pytest to the requirements.txt * and use a sufficiently high version to avoid moses-palmer/pynput#173 I would LOVE to remove the pynput dependency too, but that library is just too darn beautiful. It does exactly what we want (kudos: Al for using it here) and is totally cross platform. After a few hours looking, I can't find a way to integration this nicely without massive changes. Top alternatives: * using mocking and testing through the box-object instantiation rather than the get-and-block-and-return call * refactor tests to do something like this: https://stackoverflow.com/questions/4083796/how-do-i-run-unittest-on-a-tkinter-app * re-implement the necessary keyboard functionality from pynput to do nice cross platform testing without the import
- Loading branch information
Showing
3 changed files
with
60 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pynput==1.7.3 # required for keypress simulation for Al's integration tests |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters