summaryrefslogtreecommitdiffstats
path: root/python/samba/subunit/run.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-12-11 01:55:16 +0000
committerAndrew Bartlett <abartlet@samba.org>2015-03-06 04:41:46 +0100
commit8487f4afc1b514942f90b8f384b11f2cd66565fc (patch)
tree2a0d19a5b9acf64674cc6bedd4e225776a0dec2b /python/samba/subunit/run.py
parent9a1a34451f5c9fff702f43168e3d20df24acec41 (diff)
downloadsamba-8487f4afc1b514942f90b8f384b11f2cd66565fc.tar.gz
samba-8487f4afc1b514942f90b8f384b11f2cd66565fc.tar.xz
samba-8487f4afc1b514942f90b8f384b11f2cd66565fc.zip
Use Samba-only subunit module in selftest/tests/.
Change-Id: I48c61f975c1fa49f6e244ad39dd720fe507db45b 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.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/python/samba/subunit/run.py b/python/samba/subunit/run.py
index 33efd4f6f7..dbe6b241c8 100755
--- a/python/samba/subunit/run.py
+++ b/python/samba/subunit/run.py
@@ -24,6 +24,8 @@
$ python -m samba.subunit.run mylib.tests.test_suite
"""
+from samba.subunit import UTC
+
import datetime
import os
import sys
@@ -31,25 +33,6 @@ import traceback
import unittest
-# From http://docs.python.org/library/datetime.html
-_ZERO = datetime.timedelta(0)
-
-# A UTC class.
-
-class UTC(datetime.tzinfo):
- """UTC"""
-
- def utcoffset(self, dt):
- return _ZERO
-
- def tzname(self, dt):
- return "UTC"
-
- def dst(self, dt):
- return _ZERO
-
-utc = UTC()
-
# Whether or not to hide layers of the stack trace that are
# unittest/testtools internal code. Defaults to True since the
# system-under-test is rarely unittest or testtools.