1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

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>
This commit is contained in:
Jelmer Vernooij
2014-12-11 01:55:16 +00:00
committed by Andrew Bartlett
parent 9a1a34451f
commit 8487f4afc1
4 changed files with 42 additions and 29 deletions

View File

@ -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.