Blame SOURCES/Adjust-tests-for-Python-3.13.patch

rdobuilder 81486b
From c5563ce5c0328e4a59d676cdf35740567978742b Mon Sep 17 00:00:00 2001
rdobuilder 81486b
From: Karolina Surma <ksurma@redhat.com>
rdobuilder 81486b
Date: Wed, 5 Jun 2024 09:40:17 +0200
rdobuilder 81486b
Subject: [PATCH] Adjust tests for Python 3.13
rdobuilder 81486b
rdobuilder 81486b
---
rdobuilder 81486b
 tests/test_munch.py | 9 +++++++++
rdobuilder 81486b
 1 file changed, 9 insertions(+)
rdobuilder 81486b
rdobuilder 81486b
diff --git a/tests/test_munch.py b/tests/test_munch.py
rdobuilder 81486b
index 9dadcee..70fa82c 100644
rdobuilder 81486b
--- a/tests/test_munch.py
rdobuilder 81486b
+++ b/tests/test_munch.py
rdobuilder 81486b
@@ -225,6 +225,15 @@ def test_reserved_attributes(attrname):
rdobuilder 81486b
         assert attr == 'munch'
rdobuilder 81486b
     elif attrname == '__dict__':
rdobuilder 81486b
         assert attr == {}
rdobuilder 81486b
+    elif attrname == '__static_attributes__':
rdobuilder 81486b
+        # Python 3.13: added __static_attributes__ attribute, populated by the
rdobuilder 81486b
+        # compiler, containing a tuple of names of attributes of this class
rdobuilder 81486b
+        # which are accessed through self.X from any function in its body.
rdobuilder 81486b
+        assert isinstance(attr, tuple)
rdobuilder 81486b
+    elif attrname == '__firstlineno__':
rdobuilder 81486b
+        # Python 3.13: added __firstlineno__ attribute, populated by the
rdobuilder 81486b
+        # compiler, containing the line number of the first line of the class definition
rdobuilder 81486b
+        assert isinstance(attr, int)
rdobuilder 81486b
     else:
rdobuilder 81486b
         assert callable(attr)
rdobuilder 81486b
 
rdobuilder 81486b
-- 
rdobuilder 81486b
2.44.0
rdobuilder 81486b