Generates a .pyc file by compiling filename.
"""
-from transformer import parse, parseFile
-from visitor import walk
-from pycodegen import compile, compileFile
+from compiler.transformer import parse, parseFile
+from compiler.visitor import walk
+from compiler.pycodegen import compile, compileFile
This file is automatically generated by Tools/compiler/astgen.py
"""
-from consts import CO_VARARGS, CO_VARKEYWORDS
+from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
def flatten(seq):
l = []
class WalkerError(StandardError):
pass
-from consts import CO_VARARGS, CO_VARKEYWORDS
-from consts import OP_ASSIGN, OP_DELETE, OP_APPLY
+from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
+from compiler.consts import OP_ASSIGN, OP_DELETE, OP_APPLY
def parseFile(path):
f = open(path, "U")
self.fail_("g[42] didn't raise KeyError")
-import mapping_tests
+from test import mapping_tests
class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = dict
raise TestFailed("import of RAnDoM should have failed (case mismatch)")
# Another brief digression to test the accuracy of manifest float constants.
-import double_const # don't blink -- that *was* the test
+from test import double_const # don't blink -- that *was* the test
def remove_files(name):
for f in (name + os.extsep + "py",
__test__ = {'libreftest' : libreftest}
def test_main(verbose=None):
- import test_sets, doctest
+ import doctest
+ from test import test_sets
test_support.run_unittest(
TestSetOfSets,
TestExceptionPropagation,
from urllib2 import build_opener, HTTPHandler, HTTPError, \
HTTPCookieProcessor
- from test_cookielib import interact_netscape
+ from test.test_cookielib import interact_netscape
cj = CookieJar()
interact_netscape(cj, "http://www.example.com/", "spam=eggs")