9 Commits
Author SHA1 Message Date
Jirka Borovec 13e178a3ab Set line length to 120 characters (#2599) 2023-07-13 17:37:20 +02:00
Steve Kowalik e113e37de1 Add pyupgrade to pre-commit configuration (#1783)
To help us switch to f-strings and other 3.6+ changes, add pyupgrade to
our pre-commit configuration to keep the codebase clean.
2020-12-15 14:07:33 +11:00
Liuyang Wan af6cab5520 Reuse pre-commit checks in CI (#1442)
* Use pre-commit checks in CI

* Fix all issues flagged by mypy

* Update travis.yml to reflect testenv changes

* Update docs to use tox lint
2020-03-23 08:45:54 +08:00
Michał Górny d2e9bd69dd Use pytest to parametrize tests (#1438)
* Use pytest to parametrize tests

Use built-in pytest test case parametrization support over external
'parameterize' package.  The latter is not well maintained, and has
known Python 3.8 failures unsolved since November 2019.

Since pytest fixtures are incompatible with unittest-style tests,
rewrite the relevant test case to use pytest-style asserts.  This also
makes the resulting code simpler, as we no longer have to pass TestCase
to the helper classes.

* Refactor input cleaning in ReplayingConnection.__readNextRequest()
2020-03-18 18:44:40 +11:00
Steve Kowalik dd31a70659 Silence most ResourceWarnings (#1393)
A few test classes were failing to call tearDown() of the superclass,
which meant the file descriptors of their replydata files were leaking.
Make sure to call it, and switch every other callsite of superclasses by
name to using argument-less super().

Revert an AllTests change that snuck in during release.
2020-02-12 15:05:32 +11:00
Steve Kowalik 2af3e60d1b Fix two deprecation warnings (#1371)
Sort out two deprecation warnings to help silence the test suite.
2020-01-25 16:35:01 +11:00
Steve Kowalik b7894ea00c Drop Python 2 support (#1329)
With the Python 2 deadline gone, it's time to move with the times and
switch to Python 3 only.
2020-01-06 18:01:38 +11:00
Wan Liuyang 6ceb9e9a15 Apply black to whole codebase (#1303) 2019-12-10 17:14:33 +08:00
Adam Baratz faa1bbd61f Handle unicode strings when recording responses (#1253) (#1254)
* Handle unicode strings when recording responses (#1253)

* Add new test requirements

* Make requirement conditional

* Fix flake8 error

* Compare dict values without worrying about key order

* Improve readability
2019-10-23 14:50:08 +11:00