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 unit tests: get to at least 70% coverage #16

Open
msyriac opened this issue Sep 17, 2018 · 0 comments
Open

Add unit tests: get to at least 70% coverage #16

msyriac opened this issue Sep 17, 2018 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@msyriac
Copy link
Member

msyriac commented Sep 17, 2018

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.

@msyriac msyriac added the help wanted Extra attention is needed label Sep 17, 2018
@msyriac msyriac changed the title Add unit tests Add unit tests: get to at least 70% coverage May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant