Recent Issues
|
Sign in
with your
Google
Account to create issues and add comments
Delta Between Two Patch Sets: Lib/test/test_operator.py
Issue 602 :
range: lean and mean (Closed)
Left Patch Set: __len__ is back!
Right Patch Set: address more concerns
Use n/p to move between diff chunks;
N/P to move between comments.
Please Sign in to add in-line comments.
Jump to:
Lib/ctypes/test/test_slicing.py
Lib/test/pickletester.py
Lib/test/seq_tests.py
Lib/test/test_deque.py
Lib/test/test_enumerate.py
Lib/test/test_heapq.py
Lib/test/test_mutants.py
Lib/test/test_operator.py
Lib/test/test_random.py
Lib/test/test_range.py
Lib/test/test_set.py
Lib/test/test_trace.py
Objects/rangeobject.c
LEFT RIGHT
1 import operator 1 import operator
2 import unittest 2 import unittest
3 3
4 from test import test_support 4 from test import test_support
5 5
6 class Seq1: 6 class Seq1:
7 def __init__(self, lst): 7 def __init__(self, lst):
8 self.lst = lst 8 self.lst = lst
9 def __len__(self): 9 def __len__(self):
10 return len(self.lst) 10 return len(self.lst)
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading...
472 import gc 472 import gc
473 counts = [None] * 5 473 counts = [None] * 5
474 for i in range(len(counts)): 474 for i in range(len(counts)):
475 test_support.run_unittest(*test_classes) 475 test_support.run_unittest(*test_classes)
476 gc.collect() 476 gc.collect()
477 counts[i] = sys.gettotalrefcount() 477 counts[i] = sys.gettotalrefcount()
478 print(counts) 478 print(counts)
479 479
480 if __name__ == "__main__": 480 if __name__ == "__main__":
481 test_main(verbose=True) 481 test_main(verbose=True)
LEFT RIGHT