pixell
pixell copied to clipboard
Add unit tests: get to at least 70% coverage
The test framework for this repository is py.test. It's very easy to write unit tests. Simply add any function that starts with test_ to any script that starts with test_ anywhere in this repository (but preferentially in the tests/ directory) that has a assert statements in it which evaluate to False if something bad happens.
Example
tests/test_math.py
def test_add():
assert 2+2==4
Of course, the more non-trivial and clever the test, the better. Once this has been done, you can run
py.test
from the repo root directory to run the tests. These tests will also be run every time code is pushed.