Skip to content

Commit 94f6bee

Browse files
committed
-
1 parent 2d4fba5 commit 94f6bee

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

source_py3/test_python_toolbox/test_nifty_collections/test_lazy_tuple/test_lazy_tuple.py

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ def test_string():
9797
assert ''.join(lazy_tuple) == string
9898
assert ''.join(lazy_tuple[1:-1]) == string[1:-1]
9999

100-
assert sorted((lazy_tuple, 'abc', 'xyz', 'meowa')) == \
101-
['abc', lazy_tuple, 'meowa', 'xyz']
102-
103100
assert len(lazy_tuple) == lazy_tuple.known_length == \
104101
len(lazy_tuple.collected_data)
105102

@@ -166,68 +163,6 @@ def test_finite_iterator():
166163
assert len(my_dict) == 1
167164

168165

169-
def test_comparisons():
170-
'''Test comparisons of `LazyTuple`.'''
171-
172-
lazy_tuple = LazyTuple(iter((0, 1, 2, 3, 4)))
173-
assert lazy_tuple.known_length == 0
174-
175-
assert lazy_tuple > []
176-
assert lazy_tuple.known_length == 1
177-
178-
assert not lazy_tuple < []
179-
assert lazy_tuple.known_length == 1
180-
181-
assert not lazy_tuple <= []
182-
assert lazy_tuple.known_length == 1
183-
184-
assert not lazy_tuple >= [0, 7]
185-
assert lazy_tuple.known_length == 2
186-
187-
assert not lazy_tuple > [0, 1, 7]
188-
assert lazy_tuple.known_length == 3
189-
190-
assert lazy_tuple > [0, 1, 2, 3]
191-
assert lazy_tuple.known_length == 5
192-
193-
assert lazy_tuple == (0, 1, 2, 3, 4)
194-
assert lazy_tuple != [0, 1, 2, 3, 4] # Can't compare to mutable sequence
195-
assert lazy_tuple != (0, 1, 2, 3)
196-
assert lazy_tuple != (0, 1, 2, 3, 4, 5)
197-
assert lazy_tuple != LazyTuple((0, 1, 2, 3))
198-
assert lazy_tuple == LazyTuple((0, 1, 2, 3, 4))
199-
assert lazy_tuple != LazyTuple((0, 1, 2, 3, 4, 5))
200-
201-
assert lazy_tuple > (0, 0)
202-
assert lazy_tuple > LazyTuple((0, 0))
203-
assert lazy_tuple >= LazyTuple((0, 0))
204-
205-
assert lazy_tuple >= LazyTuple((0, 1, 2, 3))
206-
207-
assert lazy_tuple <= LazyTuple((0, 1, 2, 3, 4, 'whatever'))
208-
assert not lazy_tuple < lazy_tuple
209-
assert not lazy_tuple > lazy_tuple
210-
assert lazy_tuple <= lazy_tuple
211-
assert lazy_tuple >= lazy_tuple
212-
213-
assert lazy_tuple <= LazyTuple((0, 1, 2, 3, 5))
214-
assert lazy_tuple < LazyTuple((0, 1, 2, 3, 5))
215-
216-
assert lazy_tuple > LazyTuple((0, 1, 2, 3, 3, 6))
217-
assert lazy_tuple >= LazyTuple((0, 1, 2, 3, 3, 6))
218-
assert lazy_tuple > (0, 1, 2, 3, 3, 6)
219-
220-
assert LazyTuple(iter([])) == LazyTuple(iter([]))
221-
assert LazyTuple(iter([])) <= LazyTuple(iter([]))
222-
assert LazyTuple(iter([])) >= LazyTuple(iter([]))
223-
assert not LazyTuple(iter([])) > LazyTuple(iter([]))
224-
assert not LazyTuple(iter([])) < LazyTuple(iter([]))
225-
226-
assert LazyTuple(iter([])) <= (1, 2, 3)
227-
assert LazyTuple(iter([])) < (1, 2, 3)
228-
229-
230-
231166
def test_immutable_sequence():
232167
'''Test that `LazyTuple` is considered an immutable sequence.'''
233168
assert sequence_tools.is_immutable_sequence(LazyTuple([1, 2, 3]))

0 commit comments

Comments
 (0)