Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumIterator #321

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
checkpoint
  • Loading branch information
moshez committed Dec 12, 2022
commit a21c2de8ec9562b9bb8c8cfb84464c82e259832c
9 changes: 9 additions & 0 deletions tests/test_iterutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,3 +585,12 @@ def test_rdiv(self):

def test_rfloordiv(self):
assert list(2 // NumIterator.count()[1:5]) == [2, 1, 0, 0]

def test_neg(self):
assert list(-NumIterator.count()[:3]) == [0, -1, -2]

def test_pos(self):
assert list(+NumIterator.count()[:3]) == [0, +1, +2]

def test_pos(self):
assert list(round(NumIterator.count()[:4] / 3)) == [0, 0, 1, 1]