Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 514afeb

Browse files
committed
Merge
2 parents e28bb15 + 468ec34 commit 514afeb

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

Lib/unittest/test/testmock/testmock.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,20 +1302,6 @@ def test_magic_methods_mock_calls(self):
13021302
self.assertEqual(m.method_calls, [])
13031303

13041304

1305-
def test_attribute_deletion(self):
1306-
# this behaviour isn't *useful*, but at least it's now tested...
1307-
for Klass in Mock, MagicMock, NonCallableMagicMock, NonCallableMock:
1308-
m = Klass()
1309-
original = m.foo
1310-
m.foo = 3
1311-
del m.foo
1312-
self.assertEqual(m.foo, original)
1313-
1314-
new = m.foo = Mock()
1315-
del m.foo
1316-
self.assertEqual(m.foo, new)
1317-
1318-
13191305
def test_mock_parents(self):
13201306
for Klass in Mock, MagicMock:
13211307
m = Klass()
@@ -1379,7 +1365,8 @@ def test_attach_mock_return_value(self):
13791365

13801366

13811367
def test_attribute_deletion(self):
1382-
for mock in Mock(), MagicMock():
1368+
for mock in (Mock(), MagicMock(), NonCallableMagicMock(),
1369+
NonCallableMock()):
13831370
self.assertTrue(hasattr(mock, 'm'))
13841371

13851372
del mock.m

0 commit comments

Comments
 (0)