Commit Graph

22 Commits

Author SHA1 Message Date
Valentin Lorentz b3d775f0d6 getMessages: Raise an error when forgetting to synchronize=False
Instead of hanging forever.

Hopefully there shouldn't be any false positive.
2021-06-27 14:38:54 +02:00
Valentin Lorentz 6f68a0d601 Hide irrelevant frames on pytest failures
It makes failures easier to read, by showing only the relevant tests
instead of the helper functions.

https://doc.pytest.org/en/latest/example/simple.html#writing-well-integrated-assertion-helpers
2021-06-26 18:37:44 +02:00
Valentin Lorentz 4d2976c7e6 Use TCP_NODELAY on the socket, it may be better to make test_buffering relevant 2021-03-05 20:21:48 +01:00
Valentin Lorentz 62a87b5957 type-annotate all functions outside the tests themselves. 2021-02-28 18:45:13 +01:00
Shivaram Lingamneni 2ef4689004 restore print statement when waiting 2021-02-22 21:55:15 +01:00
Shivaram Lingamneni efab101890 remove sleep from read loops
recv() should block as necessary up to the 1-second timeout;
connection failures will break out of the loop with an exception.
There shouldn't be a case where we incur a busy wait.
2021-02-22 21:55:15 +01:00
Shivaram Lingamneni 10edb9dd9d fix LUSERS tests to work with oragono 2021-02-22 20:21:39 +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 f0141b0a93 Fix compatibility with return value of SSLSocket.sendall in python >= 3.6.
https://bugs.python.org/issue25951
2021-02-21 23:18:55 +01:00
Valentin Lorentz c9c08c7f6f client_mock: Write client name in 'waiting...' message 2021-02-19 22:25:41 +01:00
Valentin Lorentz c9dbba985c Fix crash when sendLine() is called with bytes and --show-io is given. 2021-02-19 19:19:58 +01:00
Shivaram Lingamneni d741ab86d5 add a test for message-tags 2020-11-26 00:25:52 -05:00
Shivaram Lingamneni bdefa32d3a add a test for utf8 enforcement 2020-06-22 15:48:56 -04:00
Valentin Lorentz 548ddb57b0 Add TLS certificate check tests for clients. 2016-07-20 11:41:35 +02:00
Valentin Lorentz a34d4077ca Better handling of closed connections. 2015-12-27 12:45:03 +01:00
Valentin Lorentz 5f07025a4a Add basic MONITOR tests. 2015-12-25 22:47:11 +01:00
Valentin Lorentz 50ff513ea6 Add link to Python bug tracker to explain why assertions differ. 2015-12-25 16:03:42 +01:00
Valentin Lorentz e2583a67ca Add STARTTLS tests. 2015-12-25 15:45:06 +01:00
Valentin Lorentz 073a8a3183 Return all parsed messages before raising ConnectionClosed.
Caused testQuitErrors to fail with Charybdis.
2015-12-23 21:32:20 +01:00
Valentin Lorentz caa85d25cb ClientMock.getMessages: Reuse the inbuffer. 2015-12-22 20:50:01 +01:00
Valentin Lorentz 3a3b504762 Move ClientMock to its own file. 2015-12-21 20:13:16 +01:00