示例#1
0
    def setUp(self):
        unittest.TestCase.setUp(self)
        self.globals = {}
        self.locals = MultiContext(self.globals)
        self.interpreter = GlobalAndLocalInterpreter(locals=self.locals,
                                                     globals=self.globals)

        # Name of local variable name to use in expressions
        self.input_name = 'vp'

        # Value to use in expressions.
        self.local_input = 1
        self.global_input = 1
示例#2
0
 def test_default_construction(self):
     """ Can we create a default interpreter?
     """
     interpreter = GlobalAndLocalInterpreter()