Skip to content

Commit 255b7f4

Browse files
committed
Fix test <3.12
1 parent e6ef858 commit 255b7f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_cachedmethod.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ def get_info(self, value):
488488
self.assertIs(w[1].category, DeprecationWarning)
489489

490490
def test_decorator_different_names(self):
491-
with self.assertRaises(TypeError):
491+
# RuntimeError for Python < 3.12, TypeError otherwise
492+
with self.assertRaisesRegex(Exception, "bar"):
492493

493494
class Cached:
494495
@cachedmethod(lambda _: self.cache(2))

0 commit comments

Comments
 (0)