diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2023-03-17 18:40:58 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2023-03-17 18:40:58 +0100 |
commit | 297b4dc5592b555d4fad017c7f1839144f78eef9 (patch) | |
tree | 384b9923a8aa846d8debbcce6a2be509670e215c | |
parent | 9f5281735e1683d275b813947e4c50fb6e4c13d3 (diff) | |
download | m2crypto-297b4dc5592b555d4fad017c7f1839144f78eef9.tar.gz |
Take care of CRLF x LF difference even for test case.
Fixes #331
-rw-r--r-- | tests/test_bio_membuf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_bio_membuf.py b/tests/test_bio_membuf.py index 6fe5120..a52ef28 100644 --- a/tests/test_bio_membuf.py +++ b/tests/test_bio_membuf.py @@ -121,11 +121,11 @@ class MemoryBufferTestCase(unittest.TestCase): def run_test(*args, **kwargs): sep = os.linesep.encode() - with MemoryBuffer(b'hello\nworld\n') as mb: + with MemoryBuffer(b'hello' + sep + b'world' + sep) as mb: assert mb.readable() assert mb.readline() == b'hello' + sep assert mb.readline() == b'world' + sep - with MemoryBuffer(b'hello\nworld\n') as mb: + with MemoryBuffer(b'hello' + sep + b'world' + sep) as mb: assert mb.readlines() == [b'hello' + sep, b'world' + sep] def suite(): |