templates.test_modules4
1import smartpy as sp 2 3 4@sp.module 5def main(): 6 class A(sp.Contract): 7 def __init__(self, x): 8 self.data.a = 42 9 10 class C(sp.Contract): 11 pass 12 13 class D(A, C): 14 def __init__(self, x): 15 A.__init__(self, x) 16 C.__init__(self) 17 18 19@sp.add_test() 20def test(): 21 s = sp.test_scenario("Test", main) 22 23 d = main.D(0) 24 s += d