diff options
author | Ronan Lamy <ronan.lamy@gmail.com> | 2018-12-06 17:31:35 +0000 |
---|---|---|
committer | Ronan Lamy <ronan.lamy@gmail.com> | 2018-12-06 17:31:35 +0000 |
commit | 726a45303d221da182a0d52f11ad595ea1d1e783 (patch) | |
tree | f734b4f15ba50222901751780964bd7946b1bc14 /extra_tests/test_itertools.py | |
parent | Convert test_itertools to regular (app-level) tests; the issue on CPython was... (diff) | |
download | pypy-726a45303d221da182a0d52f11ad595ea1d1e783.tar.gz pypy-726a45303d221da182a0d52f11ad595ea1d1e783.tar.bz2 pypy-726a45303d221da182a0d52f11ad595ea1d1e783.zip |
Move test_itertools to extra_tests/
Diffstat (limited to 'extra_tests/test_itertools.py')
-rw-r--r-- | extra_tests/test_itertools.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/extra_tests/test_itertools.py b/extra_tests/test_itertools.py new file mode 100644 index 0000000000..af97581697 --- /dev/null +++ b/extra_tests/test_itertools.py @@ -0,0 +1,15 @@ +import sys +import itertools + +def test_chain(): + it = itertools.chain([], [1, 2, 3]) + lst = list(it) + assert lst == [1, 2, 3] + +def test_islice_maxint(): + slic = itertools.islice(itertools.count(), 1, 10, sys.maxint) + assert len(list(slic)) == 1 + +def test_islice_largeint(): + slic = itertools.islice(itertools.count(), 1, 10, sys.maxint - 20) + assert len(list(slic)) == 1 |