Issue 287 in pyftpdlib: Test failure: test_use_gmt_times

0 views
Skip to first unread message

pyft...@googlecode.com

unread,
Apr 12, 2014, 3:57:23 AM4/12/14
to pyftpdli...@googlegroups.com
Status: New
Owner: gc...@loowis.durge.org
Labels: Type-Defect Priority-Medium Component-Library

New issue 287 by gc...@loowis.durge.org: Test failure: test_use_gmt_times
http://code.google.com/p/pyftpdlib/issues/detail?id=287

I just tried doing 'make test' and test_use_gmt_times fails on both
Python2.7.3 and Python3.2.3 with:
======================================================================
FAIL: test_use_gmt_times (__main__.TestConfigurableOptions)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_ftpd.py", line 2536, in test_use_gmt_times
self.assertEqual(gmt1, loc1)
AssertionError: '213 20140412075452' != '213 20140412085452'


Seems like the test needs to be updated to take DST into account? If it
helps, here's the output of various fields from the time module:

>>> time.localtime()
time.struct_time(tm_year=2014, tm_mon=4, tm_mday=12, tm_hour=8, tm_min=42,
tm_sec=55, tm_wday=5, tm_yday=102, tm_isdst=1)
>>> time.gmtime()
time.struct_time(tm_year=2014, tm_mon=4, tm_mday=12, tm_hour=7, tm_min=43,
tm_sec=1, tm_wday=5, tm_yday=102, tm_isdst=0)
>>> time.timezone
0
>>> time.tzname
('GMT', 'BST')
>>> time.daylight
1


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

pyft...@googlecode.com

unread,
Apr 12, 2014, 5:17:14 AM4/12/14
to pyftpdli...@googlegroups.com

Comment #1 on issue 287 by g.rodola: Test failure: test_use_gmt_times
http://code.google.com/p/pyftpdlib/issues/detail?id=287

Mmmm... not sure how to fix that. Do you?

pyft...@googlecode.com

unread,
Apr 12, 2014, 5:59:00 AM4/12/14
to pyftpdli...@googlegroups.com

Comment #2 on issue 287 by gc...@loowis.durge.org: Test failure:
test_use_gmt_times
http://code.google.com/p/pyftpdlib/issues/detail?id=287

Well, the attached patch fixes the problem for me, but ideally we'd want it
tested by people in different timezones before committing it.

Attachments:
test_use_gmt_times.patch 590 bytes
Reply all
Reply to author
Forward
0 new messages