Skip to content

* added new date pattern #155

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

Closed
wants to merge 1 commit into from
Closed

Conversation

RobWei
Copy link

@RobWei RobWei commented Aug 9, 2020

Recently i got this ValueError.
pycaching.errors.ValueError: Unknown date format - '12.06.20'.
My GC profile language is german.
So i added date format "%d.%m.%y".

@coveralls
Copy link

coveralls commented Aug 9, 2020

Coverage Status

Coverage remained the same at 94.938% when pulling c176d68 on RobWei:time-format into 45ef698 on tomasbedrich:master.

Copy link
Collaborator

@FriedrichFroebel FriedrichFroebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. Please enrich the existing test case as well to represent this additional pattern (function test_parse_date in module test_util).

* added new date pattern and test
@RobWei
Copy link
Author

RobWei commented Aug 11, 2020

I added the test. I hope it's done right.

@FriedrichFroebel
Copy link
Collaborator

Unfortunately not completely: You are fixing the parser in util.py, but your new test is for the formatter.

In lines 17 and 18 of test_util (in test_parse_date) there should be the same patterns as in parse_date (they are actually out of sync already, so feel free to just copy over the the patterns variable or add "%d-%m-%Y" there as well).

@FriedrichFroebel
Copy link
Collaborator

Fixed in #201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants