-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathother_tests.txt
More file actions
34 lines (29 loc) · 836 Bytes
/
other_tests.txt
File metadata and controls
34 lines (29 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Other tests
===========
These tests are not so expressive to go on the README page, but they are
nonetheless useful to test pyper.
This showed off the necessity for `reintegrate` iterator
>>> from pyper import test, main, single
>>> list_ = iter(['4', '5', '7'])
>>> main(' list(pp) ', list_)
['4', '5', '7']
>>> list_ = '''4
... 5
... 7
... '''
>>> test(' list(pp) ', list_)
['4', '5', '7']
Thanks to Chandrasekar Ravoori for the following test cases. This is a
weird behavior, but I do not know how a user should use this kind of
expressions and what he should expect from it:
>>> input_ = '''2
... 6
... 3
... 4
... '''
>>> test('p=="3" and list(pp) ', input_)
False
False
['3', '4']
>>> test('p=="3" and list(pp) &', input_)
3