|
3 | 3 | This dir contains integration tests, aimed to test the Command Line Interface and its output from a pure user point of
|
4 | 4 | view.
|
5 | 5 |
|
6 |
| -## Installation |
7 |
| - |
8 |
| -See also [Contributing][0]. |
9 |
| - |
10 |
| -To run the integration tests you must install [Poetry][poetry-website]. |
11 |
| - |
12 |
| -```shell |
13 |
| -pip3 install --user poetry |
14 |
| -``` |
15 |
| - |
16 |
| -For more installation options read the [official documentation][poetry-docs]. |
17 |
| - |
18 |
| -## Running tests |
19 |
| - |
20 |
| -To run all the tests from the project's root folder: |
21 |
| - |
22 |
| -```shell |
23 |
| -task test-integration |
24 |
| -``` |
25 |
| - |
26 |
| -This will create and install all necessary dependencies if not already existing and then run integrations tests. |
27 |
| - |
28 |
| -To run specific modules you must run `pytest` from the virtual environment created by Poetry. If dependencies have not |
29 |
| -already been installed first run `poetry install`. |
30 |
| - |
31 |
| -```shell |
32 |
| -poetry run pytest test/test_lib.py |
33 |
| -``` |
34 |
| - |
35 |
| -To run very specific test functions: |
36 |
| - |
37 |
| -```shell |
38 |
| -poetry run pytest test/test_lib.py::test_list |
39 |
| -``` |
40 |
| - |
41 |
| -You can avoid writing the `poetry run` prefix each time by creating a new shell inside the virtual environment: |
42 |
| - |
43 |
| -```shell |
44 |
| -poetry shell |
45 |
| -pytest test_lib.py |
46 |
| -pytest test_lib.py::test_list |
47 |
| -``` |
48 |
| - |
49 |
| -## Linting and formatting |
50 |
| - |
51 |
| -To run lint check from the project's root folder: |
52 |
| - |
53 |
| -```shell |
54 |
| -task python:check |
55 |
| -``` |
56 |
| - |
57 |
| -This will run `flake8` automatically and return any error in the code formatting, if not already installed it will also |
58 |
| -install integration tests dependencies. |
59 |
| - |
60 |
| -In case of linting errors you should be able to solve most of them by automatically formatting with: |
61 |
| - |
62 |
| -```shell |
63 |
| -task python:format |
64 |
| -``` |
65 |
| - |
66 |
| -[0]: ../docs/CONTRIBUTING.md |
67 |
| -[poetry-website]: https://python-poetry.org/ |
68 |
| -[poetry-docs]: https://python-poetry.org/docs/ |
| 6 | +For instructions, see the [contributing guide](../docs/CONTRIBUTING.md/#integration-tests). |
0 commit comments