Debian Codegraph @

docs/source/testing.rst

raw
1 Testing
2 =======
3
4 Yarg uses the built-in `unittest` framework for Python and uses `pytest` as the
5 test rig.
6
7 Running the tests using the Makefile
8 ------------------------------------
9
10 A target has been made available in the project's `Makefile` for running the
11 test rig, it will install all requirements for testing and run the tests.
12
13 .. code-block:: bash
14
15 make test
16
17 Running the tests without using the Makefile
18 --------------------------------------------
19
20 .. code-block:: bash
21
22 pip install -r requirements-test.txt
23 pytest
24
25 Running the tests with tox/detox
26 --------------------------------
27
28 A `tox` configuration is also provided if you'd like to run the test rig
29 against all the supported Python versions.
30
31 You can do this via the `Makefile` target that will install all requirements
32 and run the tests:
33
34 .. code-block:: bash
35
36 make tox
37
38 Or you can do it manually:
39
40 .. code-block:: bash
41
42 pip install -r requirements.txt -r requirements-test.txt
43 detox