1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

docs: Further config.py -> config tweaks

This commit is contained in:
Athanasius 2022-01-31 15:45:40 +00:00
parent 3e0c69be5e
commit 9af6474d3c
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -217,10 +217,16 @@ re-introduce a bug down the line.
We use the [`pytest`](https://docs.pytest.org/en/stable/) for unit testing.
The files for a test should go in a sub-directory of `tests/` named after the
(principal) file or directory that contains the code they are testing. e.g. for
journal_lock.py the tests are in `tests/journal_lock.py/test_journal_lock.py`.
The `test_` prefix on `test_journal_lock.py` is necessary in order for `pytest`
to recognise the file as containing tests to be run.
(principal) file or directory that contains the code they are testing.
For example:
- Tests for `journal_lock.py` are in
`tests/journal_lock.py/test_journal_lock.py`. The `test_` prefix on
`test_journal_lock.py` is necessary in order for `pytest` to recognise the
file as containing tests to be run.
- Tests for `config/` code are located in `tests/config/test_config.py`, not
`tests/config.py/test_config.py`
The sub-directory avoids having a mess of files in `tests`, particularly when
there might be supporting files, e.g. `tests/config/_old_config.py` or files
containing test data.