COMMENT '# NEWLINE' (3, 17) (3, 26)
NEWLINE '\\n' (3, 26) (3, 27)
DEDENT '' (4, 0) (4, 0)
-
+
There will be a bunch more tests of specific source patterns.
There are some standard formatting practices that are easy to get right.
>>> roundtrip("if x == 1:\\n"
-... " print x\\n")
+... " print x\\n")
if x == 1:
print x
>>> roundtrip("if x == 1 : \\n"
... " print x\\n")
-if x == 1 :
+if x == 1 :
print x
Comments need to go in the right place.
if not have_ctypes:
print "WARNING: _ctypes.pyd not found, ctypes will not be included"
extensions.remove("_ctypes.pyd")
-
+
# Add all .py files in Lib, except lib-tk, test
dirs={}
pydirs = [(root,"Lib")]