mirror of https://github.com/python/cpython.git
Remove Python 2 compatibility cruft from unittest.mock
This commit is contained in:
parent
ebff097937
commit
c17adf4151
|
@ -1,5 +1,8 @@
|
||||||
# mock.py
|
# mock.py
|
||||||
# Test tools for mocking and patching.
|
# Test tools for mocking and patching.
|
||||||
|
# Maintained by Michael Foord
|
||||||
|
# Backport for other versions of Python available from
|
||||||
|
# http://pypi.python.org/pypi/mock
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'Mock',
|
'Mock',
|
||||||
|
@ -259,11 +262,6 @@ def __getattr__(self, name):
|
||||||
_deleted = sentinel.DELETED
|
_deleted = sentinel.DELETED
|
||||||
|
|
||||||
|
|
||||||
class OldStyleClass:
|
|
||||||
pass
|
|
||||||
ClassType = type(OldStyleClass)
|
|
||||||
|
|
||||||
|
|
||||||
def _copy(value):
|
def _copy(value):
|
||||||
if type(value) in (dict, list, tuple, set):
|
if type(value) in (dict, list, tuple, set):
|
||||||
return type(value)(value)
|
return type(value)(value)
|
||||||
|
|
Loading…
Reference in New Issue