Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mutator unittests #31

Merged
merged 3 commits into from Feb 7, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Update the Makefile to run unit tests.

Now that we have unit tests, these can be invoked by the Makefile.
  • Loading branch information
gerph committed Jan 11, 2020
commit 24f7a6516d3ef472b92fed498fa1b2dea12dd725
@@ -24,7 +24,8 @@ ACTIVATE = source venv/${PYTHON_TOOL}/bin/activate

.PHONY: tests venv

TEST_MODULES = ${patsubst tests/%.py,%,$(wildcard tests/test_*.py)}
UNITTEST_MODULES = ${patsubst tests/%.py,%,$(wildcard tests/unittest_*.py)}
INTTEST_MODULES = ${patsubst tests/%.py,%,$(wildcard tests/test_*.py)}

ifeq (${NOCOLOUR},)
COL_NOTICE = "\\e[35m"
@@ -51,14 +52,17 @@ test_level_system: test_level_integration systemtests
# Unit tests test individual parse of a small unit.
unittests: test_testable
${NOTICE} "Running unit tests"
${GOOD} "Unit tests passed (we don't have any yet)"
@# Note: We cd into the tests directory, so that we are testing the installed version, not
@# the version in the repository.
${ACTIVATE} && cd tests && python -munittest -v ${UNITTEST_MODULES}
${GOOD} "Unit tests passed"

# Integration tests check the integration of those units.
integrationtests: test_testable
${NOTICE} "Running integration tests"
@# Note: We cd into the tests directory, so that we are testing the installed version, not
@# the version in the repository.
${ACTIVATE} && cd tests && python -munittest -v ${TEST_MODULES}
${ACTIVATE} && cd tests && python -munittest -v ${INTTEST_MODULES}
${GOOD} "Integration tests passed"

# System tests check that the way that a user might use it works.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.