templates.test_closer
1import smartpy as sp 2 3 4@sp.module 5def main(): 6 class C(sp.Contract): 7 @sp.entrypoint 8 def test_none(self, p): 9 assert p.is_none() 10 11 @sp.entrypoint 12 def test_some(self, p): 13 assert p.is_some() 14 15 16@sp.add_test() 17def test(): 18 s = sp.test_scenario("Test", main) 19 s += main.C()