diff options
author | Michael Foord <michael@voidspace.org.uk> | 2013-11-23 13:30:03 (GMT) |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2013-11-23 13:30:03 (GMT) |
commit | 514afeb65ca07823431629d4eae470a833ffe0e3 (patch) | |
tree | 9777a1ad13c7627d431d72c529b805ba0166d202 /Lib | |
parent | e28bb15054e23f79ae979a52e01fa18e9bb96b42 (diff) | |
parent | 468ec340848cc3ea343fe4045a384fabdac8951f (diff) | |
download | cpython-514afeb65ca07823431629d4eae470a833ffe0e3.zip cpython-514afeb65ca07823431629d4eae470a833ffe0e3.tar.gz cpython-514afeb65ca07823431629d4eae470a833ffe0e3.tar.bz2 |
Merge
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/unittest/test/testmock/testmock.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index ac0efeb..20cc654 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -1302,20 +1302,6 @@ class MockTest(unittest.TestCase): self.assertEqual(m.method_calls, []) - def test_attribute_deletion(self): - # this behaviour isn't *useful*, but at least it's now tested... - for Klass in Mock, MagicMock, NonCallableMagicMock, NonCallableMock: - m = Klass() - original = m.foo - m.foo = 3 - del m.foo - self.assertEqual(m.foo, original) - - new = m.foo = Mock() - del m.foo - self.assertEqual(m.foo, new) - - def test_mock_parents(self): for Klass in Mock, MagicMock: m = Klass() @@ -1379,7 +1365,8 @@ class MockTest(unittest.TestCase): def test_attribute_deletion(self): - for mock in Mock(), MagicMock(): + for mock in (Mock(), MagicMock(), NonCallableMagicMock(), + NonCallableMock()): self.assertTrue(hasattr(mock, 'm')) del mock.m |