summaryrefslogtreecommitdiffstats
path: root/python/samba/subunit/run.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-12-14 20:17:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2015-03-06 04:41:47 +0100
commit039fa938b1cfed1f973b675648a2285c7b5d4ca0 (patch)
treeeebc67ac6010c117323858a341f38f2a28da4435 /python/samba/subunit/run.py
parent8c6d85b81781a85842c38be12ce431172594e159 (diff)
downloadsamba-039fa938b1cfed1f973b675648a2285c7b5d4ca0.tar.gz
samba-039fa938b1cfed1f973b675648a2285c7b5d4ca0.tar.xz
samba-039fa938b1cfed1f973b675648a2285c7b5d4ca0.zip
Import UTC definition from utc8601 module.
Change-Id: I3ccd81090c4721b161aff272100aa71bc2f17055 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/subunit/run.py')
-rwxr-xr-xpython/samba/subunit/run.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/subunit/run.py b/python/samba/subunit/run.py
index 0eb2913919..cde6febdaf 100755
--- a/python/samba/subunit/run.py
+++ b/python/samba/subunit/run.py
@@ -24,7 +24,7 @@
$ python -m samba.subunit.run mylib.tests.test_suite
"""
-from samba.subunit import UTC
+from iso8601.iso8601 import Utc
import datetime
import os
@@ -189,7 +189,7 @@ class TestProtocolClient(unittest.TestResult):
":param datetime: A datetime.datetime object.
"""
- time = a_datetime.astimezone(UTC())
+ time = a_datetime.astimezone(Utc())
self._stream.write("time: %04d-%02d-%02d %02d:%02d:%02d.%06dZ\n" % (
time.year, time.month, time.day, time.hour, time.minute,
time.second, time.microsecond))
@@ -471,7 +471,7 @@ class AutoTimingTestResultDecorator(HookedTestResultDecorator):
time = self._time
if time is not None:
return
- time = datetime.datetime.utcnow().replace(tzinfo=UTC())
+ time = datetime.datetime.utcnow().replace(tzinfo=Utc())
self.decorated.time(time)
@property