templates.test_imported

 1import smartpy as sp
 2
 3
 4@sp.module
 5def m2():
 6    class MyContract(sp.Contract):
 7        def __init__(self):
 8            self.data.x = 0
 9
10        @sp.entrypoint
11        def entrypoint_1(self, params):
12            (a, b) = params
13            (c, d) = b
14            self.data.x += a * c * d
15
16
17@sp.add_test()
18def test():
19    scenario = sp.test_scenario("Minimal", m2)
20    scenario.h1("Minimal")
21    c1 = m2.MyContract()
22    scenario += c1