diff options
author | Chris Withers <chris@withers.org> | 2019-05-01 07:48:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 07:48:44 (GMT) |
commit | 49e27f0afb02ce7b98ed5a4387238850117f4c7e (patch) | |
tree | 5c953e3687fba50067acbd99b73fbda55e113ea4 /Lib/unittest/test/testmock | |
parent | db7197543112954b0912e3d46e39fefcb1c3b950 (diff) | |
download | cpython-49e27f0afb02ce7b98ed5a4387238850117f4c7e.zip cpython-49e27f0afb02ce7b98ed5a4387238850117f4c7e.tar.gz cpython-49e27f0afb02ce7b98ed5a4387238850117f4c7e.tar.bz2 |
remove jython support from unittest.mock (GH#13033)
Diffstat (limited to 'Lib/unittest/test/testmock')
-rw-r--r-- | Lib/unittest/test/testmock/testmock.py | 15 | ||||
-rw-r--r-- | Lib/unittest/test/testmock/testpatch.py | 1 |
2 files changed, 0 insertions, 16 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index 0e7e4a1..9bef51a 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -184,21 +184,6 @@ class MockTest(unittest.TestCase): mock.side_effect = ValueError('Bazinga!') self.assertRaisesRegex(ValueError, 'Bazinga!', mock) - @unittest.skipUnless('java' in sys.platform, - 'This test only applies to Jython') - def test_java_exception_side_effect(self): - import java - mock = Mock(side_effect=java.lang.RuntimeException("Boom!")) - - # can't use assertRaises with java exceptions - try: - mock(1, 2, fish=3) - except java.lang.RuntimeException: - pass - else: - self.fail('java exception not raised') - mock.assert_called_with(1,2, fish=3) - def test_reset_mock(self): parent = Mock() diff --git a/Lib/unittest/test/testmock/testpatch.py b/Lib/unittest/test/testmock/testpatch.py index 51c66fe..e5abd9b 100644 --- a/Lib/unittest/test/testmock/testpatch.py +++ b/Lib/unittest/test/testmock/testpatch.py @@ -1312,7 +1312,6 @@ class PatchTest(unittest.TestCase): def test_patch_multiple_create_mocks_different_order(self): - # bug revealed by Jython! original_f = Foo.f original_g = Foo.g |