""" A facade for either :mod:`unittest.mock` or its `rolling backport`__, if it is installed, with a preference for the latter as it may well have newer functionality and bugfixes. The facade also contains any bugfixes that are critical to the operation of functionality provided by testfixtures. __ https://mock.readthedocs.io """ import sys try: from mock import * from mock.mock import _Call from mock.mock import call as mock_call from mock import version_info as backport_version except ImportError: backport_version = None class MockCall: pass mock_call = MockCall() try: from unittest.mock import * from unittest.mock import _Call except ImportError: # pragma: no cover pass has_backport = backport_version is not None if not ( (has_backport and backport_version[:3] > (2, 0, 0)) or (sys.version_info < (3, 0, 0) and not has_backport) or (3, 6, 7) < sys.version_info[:3] < (3, 7, 0) or sys.version_info[:3] > (3, 7, 1) ): # pragma: no cover raise ImportError('Please upgrade Python (you have {}) or Mock Backport (You have {})'.format( sys.version_info, backport_version )) parent_name = '_mock_parent'
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
tests | Folder | 0755 |
|
|
__init__.py | File | 1.19 KB | 0644 |
|
comparison.py | File | 39.14 KB | 0644 |
|
compat.py | File | 224 B | 0644 |
|
components.py | File | 1.31 KB | 0644 |
|
datetime.py | File | 24.42 KB | 0644 |
|
django.py | File | 2.88 KB | 0644 |
|
logcapture.py | File | 10.75 KB | 0644 |
|
mock.py | File | 1.21 KB | 0644 |
|
outputcapture.py | File | 4.69 KB | 0644 |
|
popen.py | File | 9.89 KB | 0644 |
|
replace.py | File | 12.15 KB | 0644 |
|
resolve.py | File | 2.05 KB | 0644 |
|
rmtree.py | File | 2.52 KB | 0644 |
|
shouldraise.py | File | 3.58 KB | 0644 |
|
shouldwarn.py | File | 2.21 KB | 0644 |
|
sybil.py | File | 2.28 KB | 0644 |
|
tempdirectory.py | File | 12.89 KB | 0644 |
|
twisted.py | File | 4.8 KB | 0644 |
|
utils.py | File | 2.74 KB | 0644 |
|
version.txt | File | 6 B | 0644 |
|