Back to index

python3.2  3.2.2
Public Member Functions
test.test_itertools.TestGC Class Reference

List of all members.

Public Member Functions

def makecycle
def test_accumulate
def test_chain
def test_chain_from_iterable
def test_combinations
def test_combinations_with_replacement
def test_compress
def test_count
def test_cycle
def test_dropwhile
def test_groupby
def test_issue2246
def test_filter
def test_filterfalse
def test_zip
def test_zip_longest
def test_map
def test_islice
def test_permutations
def test_product
def test_repeat
def test_starmap
def test_takewhile

Detailed Description

Definition at line 1041 of file test_itertools.py.


Member Function Documentation

def test.test_itertools.TestGC.makecycle (   self,
  iterator,
  container 
)

Definition at line 1043 of file test_itertools.py.

01043 
01044     def makecycle(self, iterator, container):
01045         container.append(iterator)
01046         next(iterator)
01047         del container, iterator

Here is the caller graph for this function:

Definition at line 1048 of file test_itertools.py.

01048 
01049     def test_accumulate(self):
01050         a = []
01051         self.makecycle(accumulate([1,2,a,3]), a)

Here is the call graph for this function:

Definition at line 1052 of file test_itertools.py.

01052 
01053     def test_chain(self):
01054         a = []
01055         self.makecycle(chain(a), a)

Here is the call graph for this function:

Definition at line 1056 of file test_itertools.py.

01056 
01057     def test_chain_from_iterable(self):
01058         a = []
01059         self.makecycle(chain.from_iterable([a]), a)

Here is the call graph for this function:

Definition at line 1060 of file test_itertools.py.

01060 
01061     def test_combinations(self):
01062         a = []
01063         self.makecycle(combinations([1,2,a,3], 3), a)

Here is the call graph for this function:

Definition at line 1064 of file test_itertools.py.

01064 
01065     def test_combinations_with_replacement(self):
01066         a = []
01067         self.makecycle(combinations_with_replacement([1,2,a,3], 3), a)

Here is the call graph for this function:

Definition at line 1068 of file test_itertools.py.

01068 
01069     def test_compress(self):
01070         a = []
01071         self.makecycle(compress('ABCDEF', [1,0,1,0,1,0]), a)

Here is the call graph for this function:

Definition at line 1072 of file test_itertools.py.

01072 
01073     def test_count(self):
01074         a = []
01075         Int = type('Int', (int,), dict(x=a))
01076         self.makecycle(count(Int(0), Int(1)), a)

Here is the call graph for this function:

Definition at line 1077 of file test_itertools.py.

01077 
01078     def test_cycle(self):
01079         a = []
01080         self.makecycle(cycle([a]*2), a)

Here is the call graph for this function:

Definition at line 1081 of file test_itertools.py.

01081 
01082     def test_dropwhile(self):
01083         a = []
01084         self.makecycle(dropwhile(bool, [0, a, a]), a)

Here is the call graph for this function:

Definition at line 1096 of file test_itertools.py.

01096 
01097     def test_filter(self):
01098         a = []
01099         self.makecycle(filter(lambda x:True, [a]*2), a)

Here is the call graph for this function:

Definition at line 1100 of file test_itertools.py.

01100 
01101     def test_filterfalse(self):
01102         a = []
01103         self.makecycle(filterfalse(lambda x:False, a), a)

Here is the call graph for this function:

Definition at line 1085 of file test_itertools.py.

01085 
01086     def test_groupby(self):
01087         a = []
01088         self.makecycle(groupby([a]*2, lambda x:x), a)

Here is the call graph for this function:

Definition at line 1118 of file test_itertools.py.

01118 
01119     def test_islice(self):
01120         a = []
01121         self.makecycle(islice([a]*2, None), a)

Here is the call graph for this function:

Definition at line 1089 of file test_itertools.py.

01089 
01090     def test_issue2246(self):
01091         # Issue 2246 -- the _grouper iterator was not included in GC
01092         n = 10
01093         keyfunc = lambda x: x
01094         for i, j in groupby(range(n), key=keyfunc):
01095             keyfunc.__dict__.setdefault('x',[]).append(j)

Here is the call graph for this function:

Definition at line 1114 of file test_itertools.py.

01114 
01115     def test_map(self):
01116         a = []
01117         self.makecycle(map(lambda x:x, [a]*2), a)

Here is the call graph for this function:

Definition at line 1122 of file test_itertools.py.

01122 
01123     def test_permutations(self):
01124         a = []
01125         self.makecycle(permutations([1,2,a,3], 3), a)

Here is the call graph for this function:

Definition at line 1126 of file test_itertools.py.

01126 
01127     def test_product(self):
01128         a = []
01129         self.makecycle(product([1,2,a,3], repeat=3), a)

Here is the call graph for this function:

Definition at line 1130 of file test_itertools.py.

01130 
01131     def test_repeat(self):
01132         a = []
01133         self.makecycle(repeat(a), a)

Here is the call graph for this function:

Definition at line 1134 of file test_itertools.py.

01134 
01135     def test_starmap(self):
01136         a = []
01137         self.makecycle(starmap(lambda *t: t, [(a,a)]*2), a)

Here is the call graph for this function:

Definition at line 1138 of file test_itertools.py.

01138 
01139     def test_takewhile(self):
01140         a = []
01141         self.makecycle(takewhile(bool, [1, 0, a, a]), a)

Here is the call graph for this function:

Definition at line 1104 of file test_itertools.py.

01104 
01105     def test_zip(self):
01106         a = []
01107         self.makecycle(zip([a]*2, [a]*3), a)

Here is the call graph for this function:

Definition at line 1108 of file test_itertools.py.

01108 
01109     def test_zip_longest(self):
01110         a = []
01111         self.makecycle(zip_longest([a]*2, [a]*3), a)
01112         b = [a, None]
01113         self.makecycle(zip_longest([a]*2, [a]*3, fillvalue=b), a)

Here is the call graph for this function:


The documentation for this class was generated from the following file: