Fix warnings when running tests #4047

Merged
merged 1 commit into from Apr 11, 2016

Projects

None yet

2 participants

@stphivos
Contributor

Classes whose name begins with Test but are not test classes were collected by py.test, and giving the following errors at the end of the test run:

WC1 test_model_serializer.py cannot collect test class 'TestMetaClassModel' because it has a __init__ constructor
WC1 browsable_api/test_browsable_nested_api.py cannot collect test class 'TestNestedSerializerSerializer' because it has a __init__ constructor
779 passed, **2 pytest-warnings** in 3.57 seconds

I changed the name so that the meaning is the same but they are not picked up as tests.

Also running the tests produced a coverage.xml file which was not in .gitignore and I added as coverage.* since py.test also supports other report formats like *.html etc.

@stphivos stphivos Fix warnings when running tests
9d346e1
@tomchristie
Owner

Good call, thanks!

@tomchristie tomchristie merged commit 08dad04 into tomchristie:master Apr 11, 2016

2 checks passed

codecov/project 91.30% (target 90.00%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@stphivos stphivos deleted the stphivos:fix/test_warnings branch Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment