Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd makefile runner for tests #29
Merged
Conversation
The requirements-test.txt file describes what the tests need in order to run. That's distinct from the requirements to install - and it's needed because the unittest.mock interface isn't present on Python 2.7, so we need to use a backport. This module is then used conditionally in the two tests we currently have, so that we can run in either version. The test classes have also had comments added to describe what they're trying to test and the invariants they assume.
The test for a crash now checks that the file was actually created and that we clean that file up afterward, so that we don't affect other runs.
A small makefile allows the invocation of the test modules, so that we can exercise the system and make sure that it does sensible things when it's run - or at least that it doesn't regress.
This was referenced Jan 12, 2020
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
gerph commentedJan 12, 2020
This change introduces a makefile which can be invoked by users, or by CI systems. It sets up a virtualenv for a specific python, and then using that python installs the package using
python setup.py installwhich confirms that it is installable, then installs components that are needed by the tests themselves, and finally executes the tests. It also provides acleanandshelltarget, which may help developers to test in the same environment as the tests are run.The changes here are:
Makefile targets:
make teststo run the tests, ormake tests PYTHON_TOOL=<your python>to tests with a specific python (egpython2).make shelldrops you to a bash shell in the environment it was testing in, so you can work with what the makefile thinks its testing against.make cleanremoves the junk and the test environment so you can hopefully be sure it's going to work reliably for others.