Skip to content

Commit 0a6217d

Browse files
committed
Merge pull request numpy#3632 from charris/remove-commented-out-code
MAINT: Remove some commented out code in test_indexing.py.
2 parents fc5a0ba + 465b227 commit 0a6217d

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

numpy/core/tests/test_indexing.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,6 @@ def test_boolean(self):
488488
def test_multidim(self):
489489
# Automatically test combinations with complex indexes on 2nd (or 1st)
490490
# spot and the simple ones in one other spot.
491-
492-
# These refcount check fails, however the error seems not the indexing
493-
## Store refcount of the indexing objects, to make sure we don't leak.
494-
#gc.collect()
495-
#complex_refs_old = [sys.getrefcount(_) for _ in self.complex_indices]
496-
#simple_refs_old = [sys.getrefcount(_) for _ in self.simple_indices]
497-
#fill_refs_old = [sys.getrefcount(_) for _ in self.fill_indices]
498-
499491
with warnings.catch_warnings():
500492
# This is so that np.array(True) is not accepted in a full integer
501493
# index, when running the file seperatly.
@@ -509,16 +501,6 @@ def test_multidim(self):
509501
self._check_multi_index(self.a, index)
510502
self._check_multi_index(self.b, index)
511503

512-
## Test that none of the indexing objects leaked for any of the many
513-
## different tries (testing after every single one seems overly complex)
514-
#complex_refs_new = [sys.getrefcount(_) for _ in self.complex_indices]
515-
#simple_refs_new = [sys.getrefcount(_) for _ in self.simple_indices]
516-
#fill_refs_new = [sys.getrefcount(_) for _ in self.fill_indices]
517-
#gc.collect()
518-
#assert_equal(complex_refs_new, complex_refs_old)
519-
#assert_equal(simple_refs_new, simple_refs_old)
520-
#assert_equal(fill_refs_new, fill_refs_old)
521-
522504
# Check very simple item getting:
523505
self._check_multi_index(self.a, (0,0,0,0))
524506
self._check_multi_index(self.b, (0,0,0,0))
@@ -531,20 +513,11 @@ def test_multidim(self):
531513

532514
def test_1d(self):
533515
a = np.arange(10)
534-
535-
# These refcount check fails, however the error seems not the indexing
536-
## Store refcount of the indexing objects, to make sure we don't leak.
537-
#gc.collect()
538-
#complex_refs_old = [sys.getrefcount(_) for _ in self.complex_indices]
539-
540516
with warnings.catch_warnings():
541517
warnings.filterwarnings('error', '', DeprecationWarning)
542518
for index in self.complex_indices:
543519
self._check_single_index(a, index)
544520

545-
#gc.collect()
546-
#complex_refs_new = [sys.getrefcount(_) for _ in self.complex_indices]
547-
#assert_equal(complex_refs_new, complex_refs_old)
548521

549522

550523
if __name__ == "__main__":

0 commit comments

Comments
 (0)