| 1 |
Development |
| 2 |
----------- |
| 3 |
|
| 4 |
Install the test requirements with |
| 5 |
``pip install -r test-requirements.txt``. |
| 6 |
|
| 7 |
Install the project in pseudo-editable mode with ``flit install -s``. |
| 8 |
|
| 9 |
Tests can be ran directly invoking ``pytest``. |
| 10 |
|
| 11 |
This project uses `nox <https://nox.thea.codes/en/stable/>`_ to |
| 12 |
automate testing and linting tasks. ``nox`` is installed as part of the |
| 13 |
test requirements. Invoking ``nox`` will run all sessions, but you may |
| 14 |
also run only some them, for example ``nox -s lint`` will only run the |
| 15 |
linting session. |
| 16 |
|
| 17 |
In order to test against a live proxy server a Docker setup is provided |
| 18 |
based on the `Dante <https://www.inet.no/dante/>`_ SOCKS server. |
| 19 |
|
| 20 |
A container will start ``danted`` listening on port 1080. The |
| 21 |
docker-compose.yml will start the container and map the ports |
| 22 |
appropriately. To start the container in the background: |
| 23 |
|
| 24 |
:: |
| 25 |
|
| 26 |
docker-compose -f docker/docker-compose.yml up -d |
| 27 |
|
| 28 |
To stop it: |
| 29 |
|
| 30 |
:: |
| 31 |
|
| 32 |
docker-compose -f docker/docker-compose.yml down |
| 33 |
|
| 34 |
Alternatively, remove the ``-d`` flag to run the containers in the |
| 35 |
foreground. |