File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 66logging .basicConfig (level = logging .INFO )
77
88
9+ def no_operation ():
10+ pass
11+
12+
13+ def test_method_is_called_from ():
14+ pass
15+
16+
17+ class OtherClass (object ):
18+ def no_operation (self ):
19+ pass
20+
21+ def test_method_is_called_from (self ):
22+ pass
23+
24+
925class UtilsTests (unittest .TestCase ):
1026 def no_operation (self ):
1127 pass
@@ -21,9 +37,15 @@ def object_method(self, method):
2137
2238 self .assertTrue (TestClass .class_method (UtilsTests .test_method_is_called_from ))
2339 self .assertTrue (TestClass ().object_method (UtilsTests .test_method_is_called_from ))
40+
2441 self .assertFalse (TestClass .class_method (UtilsTests .no_operation ))
2542 self .assertFalse (TestClass ().object_method (UtilsTests .no_operation ))
2643
44+ self .assertFalse (TestClass .class_method (no_operation ))
45+ self .assertFalse (TestClass ().object_method (test_method_is_called_from ))
46+ self .assertFalse (TestClass .class_method (OtherClass .no_operation ))
47+ self .assertFalse (TestClass ().object_method (OtherClass .test_method_is_called_from ))
48+
2749
2850if __name__ == '__main__' :
2951 unittest .main ()
You can’t perform that action at this time.
0 commit comments