Tests are written by extending the TestCase
class from the unittest
module in the Python standard library. All tests can be found in the tests
directory.
All tests can be run using the following command:
docker run -it -v $PWD:/app "parsertongue/clu-phontools:latest" test-all
To run just the unit tests (with code coverage), run the following command:
docker run -it -v $PWD:/app "parsertongue/clu-phontools:latest" green -vvv --run-coverage
source activate clu-phontools
# execute the following command from the project root:
green -vvv .
The code makes use of Python type hints.
To perform type checking, run the following command:
docker run -it -v $PWD:/app "parsertongue/clu-phontools:latest" mypy --ignore-missing-imports --follow-imports=skip --strict-optional .
source activate clu-phontools
# execute the following command from the project root:
mypy --ignore-missing-imports --follow-imports=skip --strict-optional .