You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
""" Stub file for testing the project |
|
|
|
There are three predefined ways to run tests: |
|
|
|
make test: |
|
runs only unit tests, that are not marked with "fun" (for functional test) |
|
in a random order. If a test failed before, only the failed tests will be |
|
run. This is intended to be the default testing method while developing. |
|
|
|
make testall: |
|
runs unit tests and functional tests in random order. Will give a complete |
|
overview of the test suite. |
|
|
|
make coverage: |
|
runs only tests marked with "fun" (for functional tests) and generates a |
|
coverage report for the test run. The idea is to check the test coverage |
|
only on functinal tests to see if a) everything is as much covered as |
|
possible and b) to find dead code that is not called in end-to-end tests. |
|
|
|
all three test strategies will run "make lint" before to catch easily made |
|
mistakes. |
|
""" |
|
|
|
import pytest |
|
|
|
|
|
def test_example_unittest(): |
|
""" example unittest |
|
|
|
will be run by 'make test' and 'make testall' but not 'make coverage' |
|
""" |
|
assert True |
|
|
|
|
|
@pytest.mark.fun |
|
def test_example_functional_test(): |
|
""" example unittest |
|
|
|
will be by 'make coverage' and 'make testall' but not 'make test' |
|
""" |
|
assert True
|
|
|