aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (follow)
Commit message (Collapse)AuthorAgeLines
* Change pipeline testrunner to xmlrunnerGravatar Sebastiaan Zeeff2019-10-11-8/+6
| | | | | | | | | I have change the testrunner from `unittest` to `xmlrunner` in the Azure pipeline to be able to publish our test results on Azure. This is the same runner as `site` uses to generate XML reports. In addition, I've cleaned up some small mistakes in docstrings and `README.md`.
* Migrate pytest to unittestGravatar Sebastiaan Zeeff2019-10-11-11/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Recombine import groups.Gravatar scragly2019-09-18-1/+0
|
* Add basic tests for `bot.api`.Gravatar Johannes Christ2019-09-18-1/+21
|
* Add tests for `bot.cogs.token_remover`.Gravatar Johannes Christ2019-09-15-0/+10