Skip to content

Commit 2dfd3aa

Browse files
Adjust test to continue using a non-accelerated module
timedelta was optimized in Python 3.12. Use a class from difflib to maintain the sense of the original test.
1 parent 54c65fc commit 2dfd3aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_scoped_nodes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from __future__ import annotations
1010

11-
import datetime
11+
import difflib
1212
import os
1313
import sys
1414
import textwrap
@@ -2141,8 +2141,8 @@ class ParentGetattr(Getattr):
21412141
# Test that objects analyzed through the live introspection
21422142
# aren't considered to have dynamic getattr implemented.
21432143
astroid_builder = builder.AstroidBuilder()
2144-
module = astroid_builder.module_build(datetime)
2145-
self.assertFalse(module["timedelta"].has_dynamic_getattr())
2144+
module = astroid_builder.module_build(difflib)
2145+
self.assertFalse(module["SequenceMatcher"].has_dynamic_getattr())
21462146

21472147
def test_duplicate_bases_namedtuple(self) -> None:
21482148
module = builder.parse(

0 commit comments

Comments
 (0)