Files
python-exam/fix-assertion-methods.patch
Steve Kowalik 5942223f96 - Switch to pyproject macros.
- Stop using greedy globs in %files.
- Add patch fix-assertion-methods.patch:
  * Correct test assertion methods.
- Refresh no-mock.patch, to remove it from install_requires.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exam?expand=0&rev=11
2024-01-19 03:48:00 +00:00

20 lines
914 B
Diff

Index: exam-0.10.6/tests/test_asserts.py
===================================================================
--- exam-0.10.6.orig/tests/test_asserts.py
+++ exam-0.10.6/tests/test_asserts.py
@@ -52,12 +52,12 @@ class AssertChangesMixin(Exam, TestCase)
def test_raises_assertion_error_if_value_changes(self):
msg = 'Value changed from 0 to 1'
- with self.assertRaisesRegexp(AssertionError, msg):
+ with self.assertRaisesRegex(AssertionError, msg):
with self.assertDoesNotChange(len, self.thing):
self.thing.append(1)
def test_assertion_error_mentions_unexpected_result_at_after(self):
msg = 'Value changed to 1, not 3'
- with self.assertRaisesRegexp(AssertionError, msg):
+ with self.assertRaisesRegex(AssertionError, msg):
with self.assertChanges(len, self.thing, after=3):
self.thing.append(1)