diff options
author | Chris Withers <chris@withers.org> | 2019-05-02 08:26:57 +0100 |
---|---|---|
committer | Chris Withers <chris@withers.org> | 2019-05-02 09:00:35 +0100 |
commit | d338bb04d38df493fd3830be70887fba6979ce9d (patch) | |
tree | dab5c29829ec18b18238c75a0e4974b3df992b34 /mock | |
parent | a9c087d230e2a1b3de77322e010b4b92753b3b58 (diff) | |
download | mock-d338bb04d38df493fd3830be70887fba6979ce9d.tar.gz |
tests for support code backported from Py3.
Diffstat (limited to 'mock')
-rw-r--r-- | mock/tests/testsupport.py | 14 |
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 |