Running tests
Running the test suite is really straightforward!
Using runtests.py
Install your forked repo:
git clone git://github.com/<your_fork>/netjsonconfig
cd netjsonconfig/
python setup.py develop
Install test requirements:
pip install -r requirements-test.txt
Run tests with:
./runtests.py
Using nose2
Alternatively, you can use the nose2
tool (which has a ton of
available options):
nose2
Run specific test files:
# runs tests.openwrt.test_network
nose2 -s tests/openwrt/ -v test_network
# alternative way
./runtests.py tests.openwrt.test_backend.TestBackend
See test coverage with:
coverage run --source=netjsonconfig runtests.py && coverage report