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

Add+collect tests for tzinfos input types, fix missed case of invalid… #891

Merged
merged 6 commits into from Mar 20, 2019

Commits on Mar 20, 2019

  1. Combine and expand tests for tzinfos inputs

    The `tzinfos` argument allows you to add or override the mappings
    between time zone strings and tzinfo objects, this PR groups the
    existing tests for this argument together in a class, and expands on it
    to a few more cases.
    jbrockmendel authored and pganssle committed Mar 20, 2019
    Copy the full SHA
    0adb544 View commit details
    Browse the repository at this point in the history
  2. Add failing test for invalid tzinfos dictionary

    Currently, passing an argument to `tzinfos` that cannot be interpreted
    as a time zone will raise UnboundLocalError, but it should raise
    TypeError.
    jbrockmendel authored and pganssle committed Mar 20, 2019
    Copy the full SHA
    2dbf00a View commit details
    Browse the repository at this point in the history
  3. Fix error condition when invalid tzinfos is passed

    This switches the error from UnboundLocalError to TypeError.
    jbrockmendel authored and pganssle committed Mar 20, 2019
    Copy the full SHA
    d0404c6 View commit details
    Browse the repository at this point in the history
  4. Add changelog for PR dateutil#891

    jbrockmendel authored and pganssle committed Mar 20, 2019
    Copy the full SHA
    e8a1b8a View commit details
    Browse the repository at this point in the history
  5. Use convenience function for testing tz object

    For all of these tests, the most important part of the test is ensuring
    that the correct tzinfo object was attached, so it makes sense to add a
    convenience function that asserts that they are identical *and* have the
    same tzinfo object.
    pganssle committed Mar 20, 2019
    Copy the full SHA
    b8bb468 View commit details
    Browse the repository at this point in the history
  6. Add test for interpreting UTC as an integer offset

    Co-authored-by: Brock Mendel <jbrockmendel@gmail.com>
    pganssle and jbrockmendel committed Mar 20, 2019
    Copy the full SHA
    3a7f619 View commit details
    Browse the repository at this point in the history