-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Tests for non-existent tzinfo matches should NEVER match #12
Conversation
1. create a tzinfo abbreviation that should never exist on any operating system as a fix for akoumjian#8 2. fix some comment mispellings
better implementation and fix for akoumjian#8
I copied in https://raw.githubusercontent.com/thebigspoon/datefinder/master/tests/test_parse_date_string.py, but I'm still getting failed tests. The output of py.test is attached. |
@lindauer: interesting. all the tests are failing in that module. I'll have to think on this and figure out how to get an environment to reproduce this on close to yours. I see you are using the |
@lindauer: at lunch I installed Other than that I'd say @akoumjian can merge this PR and we might as well leave issue #8 open. Thoughts? /usr/local/src/datefinder whizmob$ py.test -v tests
================================================================================ test session starts ================================================================================
platform darwin -- Python 2.7.11, pytest-2.8.5, py-1.4.31, pluggy-0.3.1 -- /Users/whizmob/anaconda/bin/python
cachedir: .cache
rootdir: /usr/local/src/datefinder, inifile:
collected 27 items
tests/test_add_tzinfo.py::test_add_tzinfo[naive_datetime_obj0-PST] PASSED
tests/test_add_tzinfo.py::test_add_tzinfo[naive_datetime_obj1-MST] PASSED
tests/test_add_tzinfo.py::test_add_tzinfo[naive_datetime_obj2-CST] PASSED
tests/test_add_tzinfo.py::test_add_tzinfo[naive_datetime_obj3-EST] PASSED
tests/test_data.txt SKIPPED
tests/test_extract_date_strings.py::test_extract_date_strings[the Friday after next Tuesday the 20th-] PASSED
tests/test_extract_date_strings.py::test_extract_date_strings[This Tuesday March 2015 in the evening-] PASSED
tests/test_extract_date_strings.py::test_extract_date_strings[They said it was on 01-03-2015-on 01-03-2015] PASSED
tests/test_extract_date_strings.py::test_extract_date_strings[May 20th 2015 is nowhere near the other date-May 20 2015] PASSED
tests/test_find_and_replace.py::test_find_and_replace[due on Tuesday Jul 22, 2014 eastern standard time- tuesday jul 22 2014 eastern -captures0-EST] PASSED
tests/test_find_dates.py::test_find_date_strings[Tuesday Jul 22, 2014-expected_date0] PASSED
tests/test_find_dates.py::test_find_date_strings[December 13, 2014 at midnight-expected_date1] PASSED
tests/test_find_dates.py::test_find_date_strings[December 10, 2014, 11:02:21 pm-expected_date2] PASSED
tests/test_find_dates.py::test_find_date_strings[2:21 p.m., December 11, 2014-expected_date3] PASSED
tests/test_find_dates.py::test_find_date_strings[Fri, 12 Dec 2014 10:55:50-expected_date4] PASSED
tests/test_find_dates.py::test_find_date_strings[10:06am Dec 11, 2014-expected_date5] PASSED
tests/test_find_dates.py::test_find_date_strings[06-17-2014-expected_date6] PASSED
tests/test_find_dates.py::test_find_date_strings[13/03/2014-expected_date7] PASSED
tests/test_find_dates.py::test_find_date_strings[2016-02-04T20:16:26+00:00-expected_date8] PASSED
tests/test_parse_date_string.py::test_parse_date_string_find_replace[due on Tuesday Jul 22, 2014 eastern standard time-tuesday jul 22 2014-expected_captures0-expected_date0] PASSED
tests/test_parse_date_string.py::test_parse_date_string_find_replace[Friday pAcific stanDard time-friday-expected_captures1-expected_date1] PASSED
tests/test_parse_date_string.py::test_parse_date_string_find_replace[13/03/2014 Central Daylight Savings Time-13/03/2014-expected_captures2-expected_date2] PASSED
tests/test_parse_date_string.py::test_parse_date_string_find_replace[ on 12/24/2015 at 2pm -12/24/2015 at 2pm-expected_captures3-expected_date3] PASSED
tests/test_parse_date_string.py::test_parse_date_string_find_replace_nonexistent_tzinfo[ on 11-20-2015 6pm CST -11-20-2015 6pm-expected_captures0-expected_date0] PASSED
tests/test_parse_date_string.py::test_parse_date_string_find_replace_nonexistent_tzinfo[ on 11-20-2015 6am IRST -11-20-2015 6am-expected_captures1-expected_date1] PASSED
tests/test_simple.py::test_success PASSED
tests/test_tz_gettz.py::test_tz_gettz_for_all_patterns PASSED
======================================================================= 26 passed, 1 skipped in 0.36 seconds ======================================================================== |
We had added a few extra tests and maybe some were still in the local directory. I'll try again later today with a fresh checkout from your fork. |
Tests for non-existent tzinfo matches should NEVER match
Sorry to report that this still fails on a fresh checkout. If I change CST in the test to another timezone (say, PST), then it succeeds. To reproduce my problem, I suggest setting that test timezone to your local timezone. |
@lindauer: can you please merge this PR locally and see if it fixes your tests for issue #8 ?
@akoumjian: assuming @lindauer responds positively, then can you please review and merge?