Add patch to fix test failures with py3.12
This commit is contained in:
parent
6bbedb6192
commit
f44b16cf9e
@ -14,6 +14,8 @@ BuildRequires: python3-devel
|
||||
|
||||
# Comment out failing test
|
||||
Patch0: qrcode_test.patch
|
||||
# Fix failure with Python3.12
|
||||
Patch1: qrcode_assert-has-calls.patch
|
||||
|
||||
%description
|
||||
This module uses the Python Imaging Library (PIL) to allow for the\
|
||||
|
9
qrcode_assert-has-calls.patch
Normal file
9
qrcode_assert-has-calls.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff -rupN --no-dereference qrcode-7.4.2/qrcode/tests/test_release.py qrcode-7.4.2-new/qrcode/tests/test_release.py
|
||||
--- qrcode-7.4.2/qrcode/tests/test_release.py 2023-02-05 23:11:38.000000000 +0100
|
||||
+++ qrcode-7.4.2-new/qrcode/tests/test_release.py 2023-05-12 13:59:22.069372313 +0200
|
||||
@@ -37,4 +37,4 @@ class UpdateManpageTests(unittest.TestCa
|
||||
.replace("version", "3.11")
|
||||
.replace("date", datetime.datetime.now().strftime("%-d %b %Y"))
|
||||
)
|
||||
- mock_file().write.has_calls([mock.call(line) for line in expected])
|
||||
+ mock_file().write.assert_has_calls([mock.call(line) for line in expected if line])
|
@ -1,6 +1,6 @@
|
||||
diff -rupN qrcode-7.4.2/qrcode/tests/test_script.py qrcode-7.4.2-new/qrcode/tests/test_script.py
|
||||
diff -rupN --no-dereference qrcode-7.4.2/qrcode/tests/test_script.py qrcode-7.4.2-new/qrcode/tests/test_script.py
|
||||
--- qrcode-7.4.2/qrcode/tests/test_script.py 2023-02-05 23:11:38.000000000 +0100
|
||||
+++ qrcode-7.4.2-new/qrcode/tests/test_script.py 2023-05-01 15:38:02.789941797 +0200
|
||||
+++ qrcode-7.4.2-new/qrcode/tests/test_script.py 2023-05-12 13:59:22.053372149 +0200
|
||||
@@ -59,9 +59,9 @@ class ScriptTest(unittest.TestCase):
|
||||
def test_optimize(self, mock_print_ascii):
|
||||
main("testtext --optimize 0".split())
|
||||
|
Loading…
Reference in New Issue
Block a user