templates.test_poly
1import smartpy as sp 2 3 4@sp.module 5def main(): 6 class MyContract(sp.Contract): 7 @sp.entrypoint 8 def poly(self, params): 9 pass 10 11 12@sp.add_test() 13def test(): 14 s = sp.test_scenario("test", main) 15 c = main.MyContract() 16 s += c 17 try: 18 c.poly("abc") 19 except Exception as e: 20 print(e)