summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2013-09-15 08:05:19 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2013-09-15 08:05:19 (GMT)
commit468ec340848cc3ea343fe4045a384fabdac8951f (patch)
treea8e13b82b634a48d44d25ca552f436bfbb974769 /Lib/unittest
parent0fcf31a824239844f54e1cedd203b6286298ec26 (diff)
downloadcpython-468ec340848cc3ea343fe4045a384fabdac8951f.zip
cpython-468ec340848cc3ea343fe4045a384fabdac8951f.tar.gz
cpython-468ec340848cc3ea343fe4045a384fabdac8951f.tar.bz2
Remove shadowed test
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/test/testmock/testmock.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index 127786c..904ef4e 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