Skip to content

Commit

Permalink
Adjust test to continue using a non-accelerated module
Browse files Browse the repository at this point in the history
timedelta was optimized in Python 3.12. Use a class from
difflib to maintain the sense of the original test.
  • Loading branch information
jacobtylerwalls committed Jun 23, 2023
1 parent e5bb8b4 commit def0830
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from __future__ import annotations

import datetime
import difflib
import os
import sys
import textwrap
Expand Down Expand Up @@ -2141,8 +2141,8 @@ class ParentGetattr(Getattr):
# Test that objects analyzed through the live introspection
# aren't considered to have dynamic getattr implemented.
astroid_builder = builder.AstroidBuilder()
module = astroid_builder.module_build(datetime)
self.assertFalse(module["timedelta"].has_dynamic_getattr())
module = astroid_builder.module_build(difflib)
self.assertFalse(module["SequenceMatcher"].has_dynamic_getattr())

def test_duplicate_bases_namedtuple(self) -> None:
module = builder.parse(
Expand Down

0 comments on commit def0830

Please sign in to comment.