예제 #1
0
    def test_multiple_imports(self):
        from pypy import adder, program
        self.assertEquals(1, adder.inc())
        self.assertEquals(4, program.square(2))
        self.assertEquals(2, adder.inc())
        self.assertEquals(8, program.add(6, 2))

        from pypy import adder
        from pypy import program
        self.assertEquals(3, adder.inc())
        self.assertEquals(36, program.product(6, 2, 3))
예제 #2
0
 def test_import(self):
     from pypy import program
     self.assertEquals(4, program.square(2))
     self.assertEquals(8, program.add(6, 2))
     self.assertEquals(36, program.product(6, 2, 3))