Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666623 - dev-python/pyftpdlib-1.5.1: test_use_gmt_times fails with UTC+0 timezones
Summary: dev-python/pyftpdlib-1.5.1: test_use_gmt_times fails with UTC+0 timezones
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL: https://github.com/giampaolo/pyftpdli...
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2018-09-20 13:52 UTC by Michael 'veremitz' Everitt
Modified: 2018-10-03 21:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_666623.txt,18.57 KB, text/plain)
2018-09-20 13:52 UTC, Michael 'veremitz' Everitt
Details
build.log (file_666623.txt,66.55 KB, text/plain)
2018-09-20 13:54 UTC, Michael 'veremitz' Everitt
Details
environment (file_666623.txt,136.51 KB, text/plain)
2018-09-20 13:55 UTC, Michael 'veremitz' Everitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 'veremitz' Everitt 2018-09-20 13:52:18 UTC
Created attachment 547365 [details]
emerge --info

======================================================================
FAIL: test_use_gmt_times (pyftpdlib.test.test_functional.TestConfigurableOptions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pyftpdlib-1.5.1/work/pyftpdlib-1.5.1-python2_7/lib/pyftpdlib/test/test_functional.py", line 1835, in test_use_gmt_times
    self.assertEqual(gmt1, loc1)
AssertionError: '213 20180920024206' != '213 20180920034206'

======================================================================
FAIL: test_use_gmt_times (test_functional_ssl.TestConfigurableOptionsTLSMixin)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pyftpdlib-1.5.1/work/pyftpdlib-1.5.1-python2_7/lib/pyftpdlib/test/test_functional.py", line 1835, in test_use_gmt_times
    self.assertEqual(gmt1, loc1)
AssertionError: '213 20180920024206' != '213 20180920034206'

======================================================================
FAIL: test_use_gmt_times (test_functional.TestConfigurableOptions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pyftpdlib-1.5.1/work/pyftpdlib-1.5.1/pyftpdlib/test/test_functional.py", line 1835, in test_use_gmt_times
    self.assertEqual(gmt1, loc1)
AssertionError: '213 20180920024241' != '213 20180920034241'

----------------------------------------------------------------------
Ran 777 tests in 41.580s

FAILED (failures=3, skipped=67)
 * ERROR: dev-python/pyftpdlib-1.5.1::gentoo failed (test phase):
 *   Tests failed with python2.7
Comment 1 Michael 'veremitz' Everitt 2018-09-20 13:54:20 UTC
Created attachment 547367 [details]
build.log
Comment 2 Michael 'veremitz' Everitt 2018-09-20 13:55:39 UTC
Created attachment 547369 [details]
environment
Comment 3 Michael 'veremitz' Everitt 2018-09-20 13:56:45 UTC
# emerge -pqv '=dev-python/pyftpdlib-1.5.1::gentoo'
[ebuild  N    ] dev-python/pyftpdlib-1.5.1  USE="ssl -examples {-test}" PYTHON_TARGETS="python2_7 python3_4 (-pypy) (-python3_5)"
Comment 4 Michael 'veremitz' Everitt 2018-09-20 14:46:06 UTC
Probably related to test failure experienced with today's git version.

Issue submitted via https://github.com/giampaolo/pyftpdlib/issues/478
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-09-20 18:57:18 UTC
I suppose setting TZ in python_test() should help.
Comment 6 Michael 'veremitz' Everitt 2018-09-21 04:11:25 UTC
(In reply to Michał Górny from comment #5)
> I suppose setting TZ in python_test() should help.

Works for git version:

# TZ=GMT+1 pytest -k test_use_gmt_times -vv
==================================================== test session starts =====================================================
platform linux2 -- Python 2.7.12, pytest-3.0.3, py-1.4.30, pluggy-0.4.0 -- /usr/bin/python2.7
cachedir: .cache
rootdir: /mnt/Files/pyftpdlib, inifile:
plugins: hypothesis-3.6.0
collected 764 items

pyftpdlib/test/test_functional.py::TestConfigurableOptions::test_use_gmt_times <- pyftpdlib/test/__init__.py PASSED
pyftpdlib/test/test_functional_ssl.py::TestConfigurableOptions::test_use_gmt_times <- pyftpdlib/test/__init__.py PASSED
pyftpdlib/test/test_functional_ssl.py::TestConfigurableOptionsTLSMixin::test_use_gmt_times <- pyftpdlib/test/__init__.py PASSED

==================================================== 761 tests deselected ====================================================
========================================== 3 passed, 761 deselected in 3.39 seconds ==========================================

@mgorny .. best way to set TZ in ebuild then? Should we force it to a static value, or can we pick host time somehow?!
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-09-21 05:25:52 UTC
Just force a static value and be done with it.  Also report this stupidity upstream.
Comment 8 Michael 'veremitz' Everitt 2018-09-21 05:26:53 UTC
(In reply to Michał Górny from comment #7)
> Just force a static value and be done with it.  Also report this stupidity
> upstream.

See updated issue...
Comment 9 Larry the Git Cow gentoo-dev 2018-10-03 21:08:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aec6872c7e5263c6f41c6334628125ab53be63a1

commit aec6872c7e5263c6f41c6334628125ab53be63a1
Author:     Louis Sautier <sbraz@gentoo.org>
AuthorDate: 2018-10-03 21:04:42 +0000
Commit:     Louis Sautier <sbraz@gentoo.org>
CommitDate: 2018-10-03 21:06:33 +0000

    dev-python/pyftpdlib: fix tests with TZ=GMT
    
    Also:
    * pytest-relaxed is not loaded by default since commit
      ac9e67fa461c484fd751040bb6b58c258b6d601c.
    * make tests more verbose.
    
    Closes: https://bugs.gentoo.org/666623
    Signed-off-by: Louis Sautier <sbraz@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-python/pyftpdlib/pyftpdlib-1.5.4.ebuild | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)