Skip to content

Commit

Permalink
xfail because reference cycles are hard
Browse files Browse the repository at this point in the history
  • Loading branch information
hudson-ai committed Sep 25, 2024
1 parent 42078b1 commit 307a371
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/unit/test_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,16 @@ def test_deleting_instance_lets_method_be_garbage_collected(self):
assert meth_ref() is None


def test_deleting_instance_does_not_break_method(self):
# Reference to method but not instance
method = self.MyClass().cached_method
gc.collect()
try:
method()
except ReferenceError:
pytest.xfail(reason="This test is expected to fail due to the way weakrefs are handled in Python.")


class TestSignature:
def test_function_signature(self):
def func(a, b=1, *, c, d=2):
Expand Down

0 comments on commit 307a371

Please sign in to comment.