You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I don't quite get its purpose in the test in question:
deftest_get_timestamp_suffix():
# we need to patch temporarily TZimporttimetry:
withpatch.dict('os.environ', {'TZ': 'GMT'}):
time.tzset()
# skynet DOBassert_equal(get_timestamp_suffix(0), '-1970-01-01T00:00:00+0000')
assert_equal(get_timestamp_suffix(0, prefix="+"),
'+1970-01-01T00:00:00+0000')
# yoh found no way to mock things out and didn't want to provide# explicit call to anything to get current time with the timezone,# so disabling this test for now besides that it should return smth# sensible ;)#with patch.object(time, 'localtime', lambda: 1):# assert_equal(get_timestamp_suffix(),# '-1970-01-01T00:00:01+0000') # skynet is 1 sec oldassert(get_timestamp_suffix().startswith('-'))
finally:
time.tzset()
But timestamp 0 should always resolve to this very string. At the end of the day this is just calling time.gmtime(0), the result of which should be independent on local TZ, no? Do I miss something here, @yarikoptic ?
If I'm right, the use of time.tzset() is simply superfluous.
The text was updated successfully, but these errors were encountered:
What is the problem?
In https://ci.appveyor.com/project/mih/datalad/build/1.0.20 the following test is failing, since
time.tzset()
is available on Unix only.However, I don't quite get its purpose in the test in question:
But timestamp
0
should always resolve to this very string. At the end of the day this is just callingtime.gmtime(0)
, the result of which should be independent on local TZ, no? Do I miss something here, @yarikoptic ?If I'm right, the use of
time.tzset()
is simply superfluous.The text was updated successfully, but these errors were encountered: