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 1 12 13 class D: 14 def g(self): 15 return 2 16 17 def h(self): 18 return 3 19 20 def g(c): 21 if 1: 22 c.g() 23 if 1: 24 return c.h() 25 return c.f() 26 27 c = C() 28 d = D() 29 result1_3 = g(d) 30 31 # vim: tabstop=4 expandtab shiftwidth=4