File tree Expand file tree Collapse file tree
Lib/unittest/test/testmock Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments