File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,10 @@ class TupleSubclass(tuple):
1515
1616class CAPITest (unittest .TestCase ):
1717 def _not_tracked (self , t ):
18- # There is no need for gc.collect()
19- # since we don't track these tuples at all.
2018 self .assertFalse (gc .is_tracked (t ), t )
2119
2220 def _tracked (self , t ):
2321 self .assertTrue (gc .is_tracked (t ), t )
24- gc .collect ()
25- gc .collect ()
26- self .assertTrue (gc .is_tracked (t ), t )
2722
2823 def test_check (self ):
2924 # Test PyTuple_Check()
@@ -121,7 +116,6 @@ def test_tuple_pack(self):
121116 self .assertRaises (MemoryError , pack , PY_SSIZE_T_MAX )
122117
123118 # CRASHES pack(1, NULL)
124- # CRASHES pack(1, None)
125119 # CRASHES pack(2, [1])
126120
127121 def test_tuple_size (self ):
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ _PyTuple_MaybeUntrack(PyObject *op)
156156 _PyObject_GC_UNTRACK (op );
157157}
158158
159- /* This function helps to avoids performance issue in the GC,
159+ /* gh-139951: This function helps to avoid performance issue in the GC,
160160 * we don't track immutable tuples. */
161161static bool
162162tuple_need_tracking (PyTupleObject * self )
You can’t perform that action at this time.
0 commit comments