]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove shadowed test
authorMichael Foord <michael@voidspace.org.uk>
Sun, 15 Sep 2013 08:05:19 +0000 (20:05 +1200)
committerMichael Foord <michael@voidspace.org.uk>
Sun, 15 Sep 2013 08:05:19 +0000 (20:05 +1200)
Lib/unittest/test/testmock/testmock.py

index 127786c587783d3f809ce2bf4f87528ce63db928..904ef4ecdf206ef137c319eb7921e787b3255c0a 100644 (file)
@@ -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