Skip to content

Commit

Permalink
Test hypothesis
Browse files Browse the repository at this point in the history
  • Loading branch information
A5rocks committed Jun 12, 2024
1 parent b3f76b1 commit 7a67fb3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/trio/_tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@ def lookup_symbol(symbol: str) -> dict[str, str]:
"__deepcopy__",
}

if type(class_) == type:
# C extension classes don't have these dunders, but Python classes do
ignore_names.add("__firstlineno__")
ignore_names.add("__static_attributes__")


# pypy seems to have some additional dunders that differ
if sys.implementation.name == "pypy":
ignore_names |= {
Expand Down Expand Up @@ -401,15 +407,6 @@ def lookup_symbol(symbol: str) -> dict[str, str]:
# using .remove() instead of .delete() to get an error in case they start not
# being missing

if sys.version_info >= (3, 13):
try:
missing.remove("__firstlineno__")
missing.remove("__static_attributes__")
except:
print(f"FAILED: {class_}; {static_names}")
else:
print(f"SUCCESS: {class_}")

if (
tool == "jedi"
and BaseException in class_.__mro__
Expand Down

0 comments on commit 7a67fb3

Please sign in to comment.