Closed svanita00 closed 3 years ago
Merging #888 (57a5184) into master (0aebf57) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #888 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 1798 1817 +19
Branches 313 320 +7
=========================================
+ Hits 1798 1817 +19
Impacted Files | Coverage Δ | |
---|---|---|
arrow/arrow.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0aebf57...57a5184. Read the comment docs.
I'm not sure why the lint is failing here, I ran it locally and it passed there..
Seems like the bug found in the old PR is now fixed. :+1:
from datetime import datetime
import arrow
start = datetime(2013, 5, 5, 12, 30)
end = datetime(2013, 5, 5, 12, 40)
for r in arrow.Arrow.span_range('minute', start, end, exact=True):
print(r)
Old bug
(<Arrow [2013-05-05T12:30:00+00:00]>, <Arrow [2013-05-05T12:30:59.999999+00:00]>)
(<Arrow [2013-05-05T12:31:00+00:00]>, <Arrow [2013-05-05T12:31:59.999999+00:00]>)
(<Arrow [2013-05-05T12:32:00+00:00]>, <Arrow [2013-05-05T12:32:59.999999+00:00]>)
(<Arrow [2013-05-05T12:33:00+00:00]>, <Arrow [2013-05-05T12:33:59.999999+00:00]>)
(<Arrow [2013-05-05T12:34:00+00:00]>, <Arrow [2013-05-05T12:34:59.999999+00:00]>)
(<Arrow [2013-05-05T12:35:00+00:00]>, <Arrow [2013-05-05T12:35:59.999999+00:00]>)
(<Arrow [2013-05-05T12:36:00+00:00]>, <Arrow [2013-05-05T12:36:59.999999+00:00]>)
(<Arrow [2013-05-05T12:37:00+00:00]>, <Arrow [2013-05-05T12:37:59.999999+00:00]>)
(<Arrow [2013-05-05T12:38:00+00:00]>, <Arrow [2013-05-05T12:38:59.999999+00:00]>)
(<Arrow [2013-05-05T12:39:00+00:00]>, <Arrow [2013-05-05T12:39:59.999999+00:00]>)
(<Arrow [2013-05-05T12:40:00+00:00]>, <Arrow [2013-05-05T12:39:59.999999+00:00]>)
New correct
(<Arrow [2013-05-05T12:30:00+00:00]>, <Arrow [2013-05-05T12:30:59.999999+00:00]>)
(<Arrow [2013-05-05T12:31:00+00:00]>, <Arrow [2013-05-05T12:31:59.999999+00:00]>)
(<Arrow [2013-05-05T12:32:00+00:00]>, <Arrow [2013-05-05T12:32:59.999999+00:00]>)
(<Arrow [2013-05-05T12:33:00+00:00]>, <Arrow [2013-05-05T12:33:59.999999+00:00]>)
(<Arrow [2013-05-05T12:34:00+00:00]>, <Arrow [2013-05-05T12:34:59.999999+00:00]>)
(<Arrow [2013-05-05T12:35:00+00:00]>, <Arrow [2013-05-05T12:35:59.999999+00:00]>)
(<Arrow [2013-05-05T12:36:00+00:00]>, <Arrow [2013-05-05T12:36:59.999999+00:00]>)
(<Arrow [2013-05-05T12:37:00+00:00]>, <Arrow [2013-05-05T12:37:59.999999+00:00]>)
(<Arrow [2013-05-05T12:38:00+00:00]>, <Arrow [2013-05-05T12:38:59.999999+00:00]>)
(<Arrow [2013-05-05T12:39:00+00:00]>, <Arrow [2013-05-05T12:39:59.999999+00:00]>)
Pull Request Checklist
Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:
tox
ormake test
to find out!).tox -e lint
ormake lint
to find out!).master
branch.If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!
Description of Changes
Merged PR #817 with updated master. Added edge cases in span_range function when exact keyword is True. Added correlated tests for span_range.
Closes: #498