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

Parametrize tests for ignore_tz, dayfirst, yearfirst #894

Merged
merged 5 commits into from Mar 16, 2019

Conversation

jbrockmendel
Copy link
Contributor

Most of these tests have uninformative names and no comments, so nothing is lost by parametrizing them.

This shouldn't create merge conflicts with #891 and #892. I'll wait on these three before doing the next round.

Will add a changelog momentarily

Copy link
Member

@pganssle pganssle left a comment

Choose a reason for hiding this comment

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

Minor changes on this one.

As an aside, I do think some (maybe many) of these tests can be switched over to being hypothesis tests. We are barely using "can invert strftime for unambiguous format strings" anywhere.

dateutil/test/test_parser.py Outdated Show resolved Hide resolved
dateutil/test/test_parser.py Outdated Show resolved Hide resolved
dateutil/test/test_parser.py Outdated Show resolved Hide resolved
dateutil/test/test_parser.py Outdated Show resolved Hide resolved
@jbrockmendel
Copy link
Contributor Author

Good ideas all around on the comments, will update.

These tests have uninformative names, so they have been gathered into
three parametetrized tests.
These test that various `strftime` formats are invertable by the parser,
for the chosen date, they are all unambiguous. and independent of time.

In the future, at least some of these can be moved into a property test
that does not hard code the format or the date.
This improves the organization of the test cases and also allows us to
skip all tests requiring TZEnvContext at the class level.
@jbrockmendel
Copy link
Contributor Author

anything else needed/requested for this or #891?

@pganssle
Copy link
Member

@jbrockmendel Heh, just was waiting for CI to pass and then completely forgot about it, thanks for the ping.

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

Successfully merging this pull request may close these issues.

None yet

2 participants