@@ -488,14 +488,6 @@ def test_boolean(self):
488
488
def test_multidim (self ):
489
489
# Automatically test combinations with complex indexes on 2nd (or 1st)
490
490
# 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
-
499
491
with warnings .catch_warnings ():
500
492
# This is so that np.array(True) is not accepted in a full integer
501
493
# index, when running the file seperatly.
@@ -509,16 +501,6 @@ def test_multidim(self):
509
501
self ._check_multi_index (self .a , index )
510
502
self ._check_multi_index (self .b , index )
511
503
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
-
522
504
# Check very simple item getting:
523
505
self ._check_multi_index (self .a , (0 ,0 ,0 ,0 ))
524
506
self ._check_multi_index (self .b , (0 ,0 ,0 ,0 ))
@@ -531,20 +513,11 @@ def test_multidim(self):
531
513
532
514
def test_1d (self ):
533
515
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
-
540
516
with warnings .catch_warnings ():
541
517
warnings .filterwarnings ('error' , '' , DeprecationWarning )
542
518
for index in self .complex_indices :
543
519
self ._check_single_index (a , index )
544
520
545
- #gc.collect()
546
- #complex_refs_new = [sys.getrefcount(_) for _ in self.complex_indices]
547
- #assert_equal(complex_refs_new, complex_refs_old)
548
521
549
522
550
523
if __name__ == "__main__" :
0 commit comments