diff options
author | mathieui <mathieui@mathieui.net> | 2014-12-08 17:01:44 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-12-08 17:01:44 +0100 |
commit | e273a32ec727700d592723c4e5905510c71ed632 (patch) | |
tree | 47b04cad0ca7dfb7a79166140eca040fd8ee2870 /test/test_common.py | |
parent | 4b8749ca88ef5a7e525231893b813eb0d4b2f8c1 (diff) | |
download | poezio-e273a32ec727700d592723c4e5905510c71ed632.tar.gz poezio-e273a32ec727700d592723c4e5905510c71ed632.tar.bz2 poezio-e273a32ec727700d592723c4e5905510c71ed632.tar.xz poezio-e273a32ec727700d592723c4e5905510c71ed632.zip |
Improve the xhtml_to_poezio_colors sanitization
add some tests, and remove the test_datetime_tuple because
of python time module misbehavior with timezones set manually.
(potentially due to http://bugs.python.org/issue6478)
Diffstat (limited to 'test/test_common.py')
-rw-r--r-- | test/test_common.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/test/test_common.py b/test/test_common.py index 50643733..0b2bd279 100644 --- a/test/test_common.py +++ b/test/test_common.py @@ -14,19 +14,6 @@ from common import (datetime_tuple, get_utc_time, get_local_time, shell_split, find_argument_quoted, find_argument_unquoted, parse_str_to_secs, parse_secs_to_str, safeJID) -def test_datetime_tuple(): - time.timezone = 0 - time.altzone = 0 - - assert datetime_tuple('20130226T06:23:12') == datetime.datetime(2013, 2, 26, 6, 23, 12) - assert datetime_tuple('2013-02-26T06:23:12+02:00') == datetime.datetime(2013, 2, 26, 4, 23, 12) - - time.timezone = -3600 - time.altzone = -3600 - - assert datetime_tuple('20130226T07:23:12') == datetime.datetime(2013, 2, 26, 8, 23, 12) - assert datetime_tuple('2013-02-26T07:23:12+02:00') == datetime.datetime(2013, 2, 26, 6, 23, 12) - def test_utc_time(): delta = timedelta(seconds=-3600) d = datetime.datetime.now() |