Skip to content

Commit 06fe751

Browse files
Improvements in test 2
1 parent 77c88bb commit 06fe751

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_stackrefs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ def run_with_refcount_check(self, func, obj):
5050
for func in funcs_with_incref:
5151
refcount, flags = run_with_refcount_check(self, func, obj)
5252
self.assertLess(refcount, self.BIG_REFCOUNT)
53-
self.assertEqual(flags, 0)
53+
self.assertIn(flags, (0, -1))
5454
results.add((refcount, flags))
5555
self.assertEqual(len(results), 1)
5656

5757
results = set()
5858
for func in funcs_with_borrow:
5959
refcount, flags = run_with_refcount_check(self, func, obj)
6060
self.assertLess(refcount, self.BIG_REFCOUNT)
61-
self.assertEqual(flags, 1)
61+
self.assertIn(flags, (1, -1))
6262
results.add((refcount, flags))
6363
self.assertEqual(len(results), 1)
6464

0 commit comments

Comments
 (0)