diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2024-08-02 18:26:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 18:26:57 (GMT) |
commit | 545a328eae058b82d7279a31d7fdce08b6ff4f94 (patch) | |
tree | 77f9ab0a45c1073fba475439bc49f35181c9e1eb /Lib/test/test_compile.py | |
parent | b20893b5c2dc999bbad5723c20f0ff2aea83a428 (diff) | |
download | cpython-545a328eae058b82d7279a31d7fdce08b6ff4f94.zip cpython-545a328eae058b82d7279a31d7fdce08b6ff4f94.tar.gz cpython-545a328eae058b82d7279a31d7fdce08b6ff4f94.tar.bz2 |
[3.13] gh-122445: populate only modified fields in __static_attributes__ (#122446) (#122621)
gh-122445: populate only modified fields in __static_attributes__ (#122446)
(cherry picked from commit 498376d7a7d6f704f22a2c963130cc15c17e7a6f)
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index e29c95e..7960089 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -2056,12 +2056,15 @@ class TestSourcePositions(unittest.TestCase): self.assertLessEqual(end_col, code_end) -class TestExpectedAttributes(unittest.TestCase): +class TestStaticAttributes(unittest.TestCase): def test_basic(self): class C: def f(self): self.a = self.b = 42 + # read fields are not included + self.f() + self.arr[3] self.assertIsInstance(C.__static_attributes__, tuple) self.assertEqual(sorted(C.__static_attributes__), ['a', 'b']) |