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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #30141 -- Fixed parse_duration() for some negative durations. #10999

Merged
merged 1 commit into from Feb 24, 2019

Conversation

@earlbread
Copy link
Contributor

earlbread commented Feb 16, 2019

tests/utils_tests/test_dateparse.py Show resolved Hide resolved
@@ -116,6 +116,12 @@ def test_negative(self):
('-15:30', timedelta(minutes=-15, seconds=30)),
('-1:15:30', timedelta(hours=-1, minutes=15, seconds=30)),
('-30.1', timedelta(seconds=-30, milliseconds=-100)),
('-00:01:01', timedelta(minutes=1, seconds=1)),
('-01:01', timedelta(seconds=-59)),

This comment has been minimized.

Copy link
@timgraham

timgraham Feb 20, 2019

Member

I believe the reporter suggested that this should be -61 seconds. If this is correct, it seems that existing cases like '-15:30' also need to be changed.

This comment has been minimized.

Copy link
@earlbread

earlbread Feb 21, 2019

Author Contributor

I misunderstood the suggestion, I'll fix them.

@earlbread earlbread force-pushed the earlbread:ticket_30141 branch from ea73477 to b1dd8b9 Feb 22, 2019
@earlbread

This comment has been minimized.

Copy link
Contributor Author

earlbread commented Feb 22, 2019

I left only the failed test case when the patch is reverted and changed the behavior of parse_duration.
Please take a look.

@timgraham timgraham changed the title Fixed 30141 -- Fix parse_duration() for some negative durations Fixed #30141 -- Fixed parse_duration() for some negative durations. Feb 23, 2019
@timgraham timgraham force-pushed the earlbread:ticket_30141 branch from b1dd8b9 to 99fc5dc Feb 23, 2019
@timgraham timgraham merged commit 99fc5dc into django:master Feb 24, 2019
19 checks passed
19 checks passed
docs Build #18858 ended
Details
flake8 Build #18968 ended
Details
isort Build #18993 succeeded in 20 sec
Details
pr-mariadb/database=mysql,label=mariadb,python=python3.7 Build #3423 ended
Details
pr-mariadb/database=mysql_gis,label=mariadb,python=python3.7 Build #3423 ended
Details
pull-requests-bionic/database=mysql,label=bionic-pr,python=python3.6 Build #3903 ended
Details
pull-requests-bionic/database=mysql,label=bionic-pr,python=python3.7 Build #3903 ended
Details
pull-requests-bionic/database=mysql_gis,label=bionic-pr,python=python3.6 Build #3903 ended
Details
pull-requests-bionic/database=mysql_gis,label=bionic-pr,python=python3.7 Build #3903 ended
Details
pull-requests-bionic/database=postgis,label=bionic-pr,python=python3.6 Build #3903 ended
Details
pull-requests-bionic/database=postgis,label=bionic-pr,python=python3.7 Build #3903 ended
Details
pull-requests-bionic/database=postgres,label=bionic-pr,python=python3.6 Build #3903 ended
Details
pull-requests-bionic/database=postgres,label=bionic-pr,python=python3.7 Build #3903 ended
Details
pull-requests-bionic/database=spatialite,label=bionic-pr,python=python3.6 Build #3903 ended
Details
pull-requests-bionic/database=spatialite,label=bionic-pr,python=python3.7 Build #3903 ended
Details
pull-requests-bionic/database=sqlite3,label=bionic-pr,python=python3.6 Build #3903 ended
Details
pull-requests-bionic/database=sqlite3,label=bionic-pr,python=python3.7 Build #3903 ended
Details
pull-requests-javascript Build #15361 ended
Details
pull-requests-windows/database=sqlite3,label=windows,python=Python37 Build #10965 ended
Details
@earlbread earlbread deleted the earlbread:ticket_30141 branch Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.