Files
pytest2/py/_testing/check_compile.py
Benjamin Peterson 8a6a3183ae guard against tests trying to import this
--HG--
branch : trunk
2009-08-29 14:50:44 -05:00

14 lines
232 B
Python

import sys
def main(fn):
print("Testing %s" % (fn,))
fp = open(fn, "rb")
try:
source = fp.read()
finally:
fp.close()
compile(source, fn, "exec")
if __name__ == "__main__":
main(sys.argv[1])