void-packages/srcpkgs/python3-pyzstd/patches/support_pytest.patch
Joel Beckmeyer 0e17823681 python3-pyzstd: update to 0.15.2.
fix tests with custom do_check
2022-04-14 12:02:15 -04:00

30 lines
989 B
Diff

From b7ff78fc31ea054339693d6bf835134b8b9fbaa3 Mon Sep 17 00:00:00 2001
From: Ma Lin <malincns@163.com>
Date: Tue, 12 Apr 2022 13:00:30 +0800
Subject: [PATCH] unittests supports pytest
<more-tests>
---
tests/test_zstd.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/test_zstd.py b/tests/test_zstd.py
index 263a753..0d254b9 100644
--- a/tests/test_zstd.py
+++ b/tests/test_zstd.py
@@ -3231,9 +3231,6 @@ def cb(a,b,c,d):
compress_stream(io.BytesIO(b''), io.BytesIO(), callback=cb)
decompress_stream(io.BytesIO(b''), io.BytesIO(), callback=cb)
-def test_main():
- unittest.main()
-
# uncompressed size 130KB, more than a zstd block.
# with a frame epilogue, 4 bytes checksum.
TEST_DAT_130KB = (b'(\xb5/\xfd\xa4\x00\x08\x02\x00\xcc\x87\x03:\xaaYN4pf\xc8\xae\x06b\x02'
@@ -4419,4 +4416,4 @@ def test_main():
b'\xb7\x99\x1b\xce\xc9\t*\x98\x97\xb43z\x01h\x9fu\xf1')
if __name__ == "__main__":
- test_main()
+ unittest.main()