aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils (follow)
Commit message (Collapse)AuthorAgeLines
* Remove lingering pytest test_time.py fileGravatar Sebastiaan Zeeff2020-02-23-62/+0
| | | | I forgot to remove one pytest test file during the migration from pytest to unittest. Since we have sinced added a unittest version of the same file, I've now removed the lingering pytest file.
* Merge branch 'master' into unittest-migrationGravatar Sebastiaan Zeeff2019-10-15-0/+62
|\ | | | | | | | | Resolving merge conflicts from master in `.gitignore` and `tests/helpers.py`.
| * Raise `ValueError` on negative `max_units`.Gravatar Johannes Christ2019-10-12-3/+6
| |
| * Implement test cases suggested by @MarkKoz.Gravatar Johannes Christ2019-10-11-0/+11
| |
| * Add tests for `bot.utils.time`.Gravatar Johannes Christ2019-09-20-0/+48
| |
* | Migrate pytest to unittestGravatar Sebastiaan Zeeff2019-10-11-66/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a discussion in the core developers channel, we have decided to migrate from `pytest` to `unittest` as the testing framework. This commit sets up the repository to use `unittest` and migrates the first couple of tests files to the new framework. What I have done to migrate to `unitest`: - Removed all `pytest` test files, since they are incompatible. - Removed `pytest`-related dependencies from the Pipfile. - Added `coverage.py` to the Pipfile dev-packages and relocked. - Added convenience scripts to Pipfile for running the test suite. - Adjust to `azure-pipelines.yml` to use `coverage.py` and `unittest`. - Migrated four test files from `pytest` to `unittest` format. In addition, I've added five helper Mock subclasses in `helpers.py` and created a `TestCase` subclass in `base.py` to add an assertion that asserts that no log records were logged within the context of the context manager. Obviously, these new utility functions and classes are fully tested in their respective `test_` files. Finally, I've started with an introductory guide for writing tests for our bot in `README.md`.
* Use `@pytest.fixture` for creating contexts.Gravatar Johannes Christ2019-09-15-16/+15
|
* Add tests for `bot.utils.checks`.Gravatar Johannes Christ2019-09-15-0/+67