Commit Graph

71 Commits

Author SHA1 Message Date
Valentin Lorentz 8cefc57e61 cases: Get rid of the subcommand/subparams nonsense
Tt was specific to the CAP command but pretended to be generic.

Instead, allow matching on the params argument using Ellipsis.
2021-02-28 08:59:48 +01:00
Valentin Lorentz 51d0ce4483 Remove getIsupport(), it's redundant with server_support 2021-02-27 16:00:28 +01:00
Valentin Lorentz 309a0e45e7 assertMessageEqual: fix error msg 2021-02-27 14:14:08 +01:00
Valentin Lorentz 0352a83a73 Change IRCv3 marks to reference capabilities instead of v3.1 / v3.2 2021-02-27 12:59:28 +01:00
Valentin Lorentz ae09b99d0e Overload the < <= > >= comparison assertion methods. 2021-02-26 21:06:17 +01:00
Valentin Lorentz 0a1ccfec24 Fix assertMessageEqual to actually raise the exception 2021-02-26 21:05:01 +01:00
Valentin Lorentz ff67739c67 Add _IrcTestCase.messageDiffers to allow matching messages without using assertions. 2021-02-26 19:16:24 +01:00
Valentin Lorentz c90141bc61 Use a dedicated 'deprecated' mark instead of add '-deprecated' for each spec
Also rename `@cases.SpecificationSelector.requiredBySpecification("xxx")`
to `@cases.mark_specifications("xxx")` because it's shorter and looks
like pytest's own syntax
2021-02-24 19:19:35 +01:00
Valentin Lorentz 2bd5093df9 Remove strip_first_param argument, it's unused. 2021-02-24 18:19:29 +01:00
Valentin Lorentz 8ea7197f76 Crash when a controlled process stopped instead of waiting forever. 2021-02-24 16:18:08 +01: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 b4873fdea4 Ignore return value of sendall; it's not None on py < 3.6.
https://bugs.python.org/issue25951
2021-02-21 22:05:15 +01:00
Valentin Lorentz 373c705247 Add STS tests. 2021-02-21 22:05:15 +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
Valentin Lorentz fe694487c7 Better handling of connections closed by clients. 2021-02-20 10:43:00 +01:00
Shivaram Lingamneni 8d427c80c8 fix stall on failed channel join 2021-02-18 19:35:11 +01:00
Valentin Lorentz 9b2a6a063c Don't pass a 'config' argument to the controller, only Oragono had it.
Instead, annotate tests with the optional features they may need from the IRCd.
2021-02-15 23:29:10 +01:00
Shivaram Lingamneni 706e794df6 test for mute extban 2020-10-21 11:08:14 -04:00
Shivaram Lingamneni 8851083a3e remove limnoria/supybot 2020-09-13 06:38:15 -04:00
Shivaram Lingamneni d490f532c8 add a test for confusable nicks 2020-03-11 06:51:23 -04:00
Shivaram Lingamneni 5073dd7a3d enhanced chathistory test 2020-02-17 04:05:21 -05:00
Shivaram Lingamneni 088d02e8ec expand pyflakes list 2019-02-17 15:39:35 -05:00
Shivaram Lingamneni f4b65a453d fix assertDisconnected 2018-12-30 19:05:13 -05:00
Shivaram Lingamneni 019639ba88 framework enhancements 2018-12-28 13:42:47 -05:00
Daniel Oaks 39a90e5726 Don't send empty CAP REQ 2017-11-01 23:33:43 +00:00
Daniel Oaks 754f9ad250 Fix channel deterministic joining s'more 2017-11-01 17:42:44 +00:00
Daniel Oaks e4c3490787 Make tests around joining channels more deterministic 2017-11-01 17:29:45 +00:00
Valentin Lorentz 548ddb57b0 Add TLS certificate check tests for clients. 2016-07-20 11:41:35 +02:00
Valentin Lorentz 68e6adda69 Add tests for extended-join. 2015-12-29 12:54:09 +01:00
Valentin Lorentz 5f07025a4a Add basic MONITOR tests. 2015-12-25 22:47:11 +01:00
Valentin Lorentz e2583a67ca Add STARTTLS tests. 2015-12-25 15:45:06 +01:00
Valentin Lorentz 1281901eb3 Remove debug print. 2015-12-24 21:21:06 +01:00
Valentin Lorentz da54b76b78 Add test on the interaction of server-time and echo-message. 2015-12-24 21:14:59 +01:00
Valentin Lorentz 9943753e2b Don't use subTest, it gives bad tracebacks. 2015-12-24 01:12:33 +01:00
Valentin Lorentz 5d4473b767 Add option --loose. 2015-12-23 19:39:34 +01:00
Valentin Lorentz d3617b7012 Make port wait lazy. This way, we don't want for the server to start if the test is skipped immediately. 2015-12-23 01:54:10 +01:00
Valentin Lorentz 53f916991f Add METADATA tests. 2015-12-22 22:33:23 +01:00
Valentin Lorentz 69203a145d Split connectClient into connectClient and skipToWelcome. 2015-12-22 20:49:31 +01:00
Valentin Lorentz 2cc4ad4f0f Make the set of tested specifications configurable. 2015-12-22 19:55:48 +01:00
Valentin Lorentz ef8adc7ede Rename irctest.optionality to irctest.runner, and clean code a bit. 2015-12-22 18:54:06 +01:00
Valentin Lorentz 95db1d4dfd Add tests for channel names sensitivity. 2015-12-22 12:14:55 +01:00
Valentin Lorentz 63671afcf4 Add TOPIC test cases. 2015-12-22 05:06:51 +01:00
Valentin Lorentz 3b196ce445 Add test testKickSendsMessages. 2015-12-22 01:56:01 +01:00
Valentin Lorentz d5de337c8d Add tests for AUTHENTICATE with auth string longer than 399 characters. 2015-12-22 00:47:02 +01:00
Valentin Lorentz 647894b50f Make assertion messages readable by people who are not me. 2015-12-21 21:48:59 +01:00
Valentin Lorentz 3a3b504762 Move ClientMock to its own file. 2015-12-21 20:13:16 +01:00
Valentin Lorentz b71e1f3355 Fix BaseServerTestCase when there is more than one user. 2015-12-21 16:36:09 +01:00
Valentin Lorentz 4ac1108f82 Add quotes from specifications to test descriptions. 2015-12-21 13:09:30 +01:00