summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Withers <chris@withers.org>2019-05-02 08:26:57 +0100
committerChris Withers <chris@withers.org>2019-05-02 09:00:35 +0100
commitd338bb04d38df493fd3830be70887fba6979ce9d (patch)
treedab5c29829ec18b18238c75a0e4974b3df992b34
parenta9c087d230e2a1b3de77322e010b4b92753b3b58 (diff)
downloadmock-d338bb04d38df493fd3830be70887fba6979ce9d.tar.gz
tests for support code backported from Py3.
-rw-r--r--mock/tests/testsupport.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/mock/tests/testsupport.py b/mock/tests/testsupport.py
new file mode 100644
index 0000000..4882572
--- /dev/null
+++ b/mock/tests/testsupport.py
@@ -0,0 +1,14 @@
+# Tests to make sure helpers we backport are actually working!
+from unittest import TestCase
+
+from .support import uncache
+
+
+class TestUncache(TestCase):
+
+ def test_cant_uncache_sys(self):
+ with self.assertRaises(ValueError):
+ with uncache('sys'): pass
+
+ def test_uncache_non_existent(self):
+ with uncache('mock.tests.support.bad'): pass