import unittest
from util import eval_code

class test_opcodes_imports(unittest.TestCase):
    def test_import(self):
        self.failUnless(eval_code("import token;token.BACKQUOTE","25\n",title='test_opcodes_imports: 1'))
        self.failUnless(eval_code("from token import BACKQUOTE,VBAR; (BACKQUOTE,VBAR)","(25, 18)\n",title='test_opcodes_imports: 2'))
        self.failUnless(eval_code("from token import *; (BACKQUOTE,VBAR)","(25, 18)\n",title='test_opcodes_imports: 3'))
        
if __name__ == "__main__":
    unittest.main()

