1 #!/usr/bin/env python 2 3 """ 4 This test attempts to cause the recording of the usage of 'C' in the function 5 'g', alongside the expectation that 'D' might be used instead. A guard 6 stipulating constraints for all of 'g' cannot therefore be generated. 7 """ 8 9 class C: 10 def f(self): 11 return 0 12 13 class D: 14 def f(self): 15 return 1 16 17 def g(self): 18 return 2 19 20 def h(self): 21 return 3 22 23 def g(c): 24 if 1: 25 c.g() 26 if 1: 27 return c.h() 28 return c.f() 29 30 c = C() 31 d = D() 32 result1_3 = g(d) 33 34 # vim: tabstop=4 expandtab shiftwidth=4