Skip to content

Commit b2dceec

Browse files
committed
-
1 parent 58ffca3 commit b2dceec

File tree

15 files changed

+5
-2649
lines changed

15 files changed

+5
-2649
lines changed

source_py2/python_toolbox/third_party/unittest2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
framework in Python 2.7. It is tested to run on Python 2.4 - 2.6.
66
77
To use unittest2 instead of unittest simply replace ``import unittest`` with
8-
``from python_toolbox.third_party import unittest2``.
8+
``import unittest2``.
99
1010
1111
Copyright (c) 1999-2003 Steve Purcell
@@ -31,7 +31,7 @@
3131
'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless',
3232
'expectedFailure', 'TextTestResult', '__version__', 'collector']
3333

34-
__version__ = '0.5.2'
34+
__version__ = '0.5.1'
3535

3636
# Expose obsolete functions for backwards compatibility
3737
__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases'])

source_py2/python_toolbox/third_party/unittest2/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
__unittest = True
88

9-
from python_toolbox.third_party.unittest2.main import main_
9+
from unittest2.main import main_
1010
main_()

source_py2/python_toolbox/third_party/unittest2/case.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
__unittest = True
1919

2020

21-
def _is_instance(a, b):
22-
if hasattr(b, '__instancecheck__'):
23-
return b.__instancecheck__(a)
24-
else:
25-
return isinstance(a, b)
26-
27-
2821
DIFF_OMITTED = ('\nDiff is %s characters long. '
2922
'Set self.maxDiff to None to see it.')
3023

@@ -968,13 +961,13 @@ def assertIsNotNone(self, obj, msg=None):
968961
def assertIsInstance(self, obj, cls, msg=None):
969962
"""Same as self.assertTrue(isinstance(obj, cls)), with a nicer
970963
default message."""
971-
if not _is_instance(obj, cls):
964+
if not isinstance(obj, cls):
972965
standardMsg = '%s is not an instance of %r' % (safe_repr(obj), cls)
973966
self.fail(self._formatMessage(msg, standardMsg))
974967

975968
def assertNotIsInstance(self, obj, cls, msg=None):
976969
"""Included for symmetry with assertIsInstance."""
977-
if _is_instance(obj, cls):
970+
if isinstance(obj, cls):
978971
standardMsg = '%s is an instance of %r' % (safe_repr(obj), cls)
979972
self.fail(self._formatMessage(msg, standardMsg))
980973

source_py3/python_toolbox/third_party/unittest2/__init__.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

source_py3/python_toolbox/third_party/unittest2/__main__.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)