-
Notifications
You must be signed in to change notification settings - Fork 27
/
HACKING
39 lines (26 loc) · 833 Bytes
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Tests
=====
Tests run best from a virtualenv using python2.7. Though most tests use
fakeredis, some do actually require an actual redis running locally.
From the 'app/' folder, run:
python -m unittest discover
or
python -m unittest tests.test_suite
Example Test Setup
------------------
$ redis-cli ping # ensure redis is available
$ cd app
$ virtualenv -p python2.7 venv
$ . venv/bin/activate
$ pip install -r ../requirements-dev.txt
$ python -m unittest discover
...
Ran 787 tests in 1.852s
OK
Test Code Coverage
==================
To have a test coverage report, install the `coverage` package via pip, and
then execute:
cd app/
coverage run -m unittest tests.test_suite 2>/dev/null && coverage html
The output will be stored in the `kernel-ci-backend-coverage` directory.