Commit Graph

11 Commits

Author SHA1 Message Date
Valentin Lorentz c58167b42d Fix deprecation warning 2023-09-02 16:24:57 +02:00
Valentin Lorentz 6b1084face Add support for pytest 7.0.0 2022-02-04 20:48:28 +01:00
Valentin Lorentz 59a8a3e270 Make pytest show the diff between assertion operands.
Closes GH-118.
2021-11-01 09:28:51 +01:00
Valentin Lorentz 7e024b9ead Add CLI option --services-controller to allow alternatives to Atheme (none for now)
+ fix some issues with killing services processes
2021-07-07 14:02:47 +02:00
Valentin Lorentz 0177c369dd Switch from unittest-style to pytest-style test collection
I was to use parametrization in a future test, but pytest doesn't
support it on unittest-style tests.
2021-07-04 17:06:37 +02:00
Valentin Lorentz ed2b75534e Exclude server/client tests when running selftests. 2021-07-04 17:06:37 +02:00
Valentin Lorentz cfe0b0d3dd Add test for message matching commands
+ fix a bug in tested code
+ change conftest.py to allow missing --controller arg (which is
  an UI improvement, as it allows using 'pytest --help' now)
2021-04-18 09:21:27 +02:00
Valentin Lorentz f9d0ec18ff Make flake8 pass, and run it automatically. 2021-02-22 19:42:18 +01:00
Valentin Lorentz 836cc5d6d2 Use isort to order imports. 2021-02-22 19:42:18 +01:00
Valentin Lorentz 8016e01daf Use Black code style 2021-02-22 19:42:18 +01:00
Valentin Lorentz 85f02c4626 Use pytest as a test runner instead of unit test
'./test <controller> -s spec1 -s spec2' becomes:
'pytest --controller <controller> -k "spec1 or spec2"'

This uses pytest's test selection, which allows finer selection of which tests
to run (for example, it will allow running all tests but those requiring one
feature or combination of features).
It also allows running only a particular test (or set of test) by
filtering on their name or file name.

pytest also shows a much nicer output while testing (grouped by file,
percentage of tests run, manages the verbosity); and it captures all the output
and only shows it if the test fails, which makes --show-io irrelevant.
2021-02-21 18:03:20 +01:00