File test-pytest310.patch of Package translate-toolkit

Description: Fix tests for pytest 3.10
Author: Stuart Prescott <stuart@debian.org>
Forwarded: https://github.com/translate/translate/pull/3841
--- a/translate/misc/test_deprecation.py
+++ b/translate/misc/test_deprecation.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-from pytest import deprecated_call, raises
+from pytest import deprecated_call, raises, mark
 
 from translate.misc.deprecation import deprecated
 
@@ -18,5 +18,6 @@
     def test_deprecated_decorator(self):
         deprecated_call(self.deprecated_helper)
 
-        with raises(AssertionError):
-            deprecated_call(self.active_helper)
+    @mark.filterwarnings("error")
+    def test_no_deprecated_decorator(self):
+        self.active_helper()
openSUSE Build Service is sponsored by