| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
This reverts commit 960619c23300c56c8aaa454edc7241e2badf80ad.
|
|
|
|
| |
All of the tag content is out of scope for this PR.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
| |
Since the Discord.py repository has been archived, we can switch to the latest commit of 2.0a0, knowing no breaking change will occur (still pinned to the commit just in case).
This commits fixes any problem related to the migration:
- New avatar interface
- TZ aware datetimes
- Various inernal API changes
|
| |
|
|
|
|
| |
The test suite for the new role/member syncers used the "old"-style test suite with the helpers implemented for Python 3.7. I have migrated it to use the new Python 3.8 asyncio test helpers.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
The subclass will contain assertions that are useful for testing Discord
commands. The currently included assertion tests that a command will
raise a MissingPermissions exception if the author lacks permissions.
|
|/
|
|
|
|
| |
We used inheritence to add additional logging assertion methods to unittest's TestCase class. However, with the introduction of the new IsolatedAsyncioTestCase this extension strategy means we'd have to create multiple child classes to be able to use the extended functionality in all of the TestCase variants.
Since that leads to undesirable code reuse and an inheritance relationship is not at all needed, I've switched to a mixin-composition based approach that allows the user to extend the functionality of any TestCase variant with a mixin where needed.
|
|
|
|
|
|
|
|
|
|
|
| |
I forgot to test some aspects of the `tests.base` module, including
some branches of the `self.assertNotLogs` method. I've corrected that
by including a couple of tests.
I also removed the test result publishing from the Azure pipeline,
since I've not configured an XML test runner yet. The coverage report
is still published, of course and test output will be available in
standard out, so information is readily available.
|
|
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`.
|