testing.unit.test_lazy module

class testing.unit.test_lazy.AndOrTestCase(*args)[source]

Bases: testing.unit.test_lazy.Iterators

Test And and Or

testAndShortcut()[source]

And should return if any false

testEmpty()[source]

And() -> true, Or() -> false

testNormalAnd()[source]

And should go through true iterators, picking last

testNormalOr()[source]

Or goes through false iterators, picking last

testOrShortcut()[source]

Or should return if any true

class testing.unit.test_lazy.CatTestCase(*args)[source]

Bases: testing.unit.test_lazy.Iterators

Test concatenation of iterators

testEmpty()[source]

Empty + empty = empty

testNumbers()[source]

1 to 50 + 51 to 100 = 1 to 100

testShortcut()[source]

Process iterators in order

class testing.unit.test_lazy.FilterTestCase(*args)[source]

Bases: testing.unit.test_lazy.Iterators

Tests for lazy_filter function

testEmpty()[source]

empty iterators -> empty iterators

testError()[source]

Should raise appropriate error

testNum1()[source]

Test numbers 1 - 100 #1

class testing.unit.test_lazy.FoldingTest(*args)[source]

Bases: testing.unit.test_lazy.Iterators

Test folding operations

f(x, y)[source]
testAddition()[source]

Use folds to sum lists

testEmpty()[source]

Folds of empty iterators should produce defaults

testLargeAddition()[source]

Folds on 10000 element iterators

testLen()[source]

Use folds to calculate length of lists

class testing.unit.test_lazy.ITRBadder[source]

Bases: duplicity.lazy.ITRBranch

branch_process(subinstance)[source]
end_process()[source]
start_process(index)[source]
class testing.unit.test_lazy.ITRBadder2[source]

Bases: duplicity.lazy.ITRBranch

branch_process(subinstance)[source]
can_fast_process(index)[source]
end_process()[source]
fast_process(index)[source]
start_process(index)[source]
class testing.unit.test_lazy.IterEqualTestCase(*args)[source]

Bases: testing.unit.test_lazy.Iterators

Tests for iter_equal function

testEmpty()[source]

Empty iterators should be equal

testGenerators()[source]

equals works for generators

testLength()[source]

Differently sized iterators

testNormal()[source]

See if normal iterators are equal

testNormalInequality()[source]

See if normal unequals work

class testing.unit.test_lazy.Iterators(*args)[source]

Bases: testing.unit.UnitTestCase

alwayserror(x)[source]
empty(s)
emptygen_maker()[source]
evens(s)
falseerror_maker()[source]
nameerror_maker()[source]
odds(s)
one_to_100(s)
trueerror_maker()[source]
typeerror_maker()[source]
class testing.unit.test_lazy.MapTestCase(*args)[source]

Bases: testing.unit.test_lazy.Iterators

Test mapping of iterators

testEmpty()[source]

Map of an empty iterator is empty

testNumbers()[source]

1 to 100 * 2 = 2 to 200

testShortcut()[source]

Map should go in order

class testing.unit.test_lazy.MultiplexTest(*args)[source]

Bases: testing.unit.test_lazy.Iterators

testDouble()[source]

Test splitting into two...

testSingle()[source]

Test multiplex single stream

testTrible()[source]

Test splitting iterator into three

class testing.unit.test_lazy.TreeReducerTest(methodName='runTest')[source]

Bases: testing.unit.UnitTestCase

setUp()[source]
testTreeReducer()[source]

testing IterTreeReducer

testTreeReducerState()[source]

Test saving and recreation of an IterTreeReducer