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

Improve IsoDateTimeField test clarity #790

Merged
merged 1 commit into from
Oct 18, 2017

Conversation

rpkilby
Copy link
Collaborator

@rpkilby rpkilby commented Oct 18, 2017

I can go into more detail if necessary, but the gist is that I made some weird decisions when writing the tests for #296. This became apparent when reviewing the tests in #750.

This PR removes the tz offset arithmetic, making the tests a little more straightforward to understand.

- Use appropriate asserts for isinstance and is None
- Replace confusing tz offset calculations with simpler time deltas.
@codecov-io
Copy link

codecov-io commented Oct 18, 2017

Codecov Report

Merging #790 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #790   +/-   ##
========================================
  Coverage    97.45%   97.45%           
========================================
  Files           15       15           
  Lines         1220     1220           
========================================
  Hits          1189     1189           
  Misses          31       31

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 22052d7...e3a7e23. Read the comment docs.

@carltongibson carltongibson added this to the Version 1.1 milestone Oct 18, 2017
@carltongibson
Copy link
Owner

Good timing. I was just about to roll 1.1

Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

OK. Looks fine. Thank you!

@carltongibson carltongibson merged commit b9fcde4 into carltongibson:develop Oct 18, 2017
@rpkilby rpkilby deleted the tz-tests branch October 18, 2017 07:31
@rpkilby
Copy link
Collaborator Author

rpkilby commented Oct 18, 2017

Side note - I'm amused that my 100th pr for django-filter is improving my first pr 😛 .

carltongibson pushed a commit that referenced this pull request Oct 19, 2017
- Use appropriate asserts for isinstance and is None
- Replace confusing tz offset calculations with simpler time deltas.
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.

3 participants