From 6dbf1ffb3a69fea97b72de2af527196b866a8f69 Mon Sep 17 00:00:00 2001 From: Parsa Ghadimi Date: Fri, 7 Sep 2018 13:06:45 +0430 Subject: [PATCH] Port install_test to python3 --- install_test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install_test.py b/install_test.py index cde4f7d..5f30d25 100755 --- a/install_test.py +++ b/install_test.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # Copyright 2018 the Deno authors. All rights reserved. MIT license. -# TODO travis and appveyor. test on python 2 and 3. +from __future__ import print_function + import sys import shutil import os @@ -14,7 +15,7 @@ def main(): PATTERN = "DENO_EXE: " home = os.path.expanduser("~") expected_bin_dir = os.path.join(home, ".deno", "bin") - print "Testing install.py ... Expect deno installed to ", expected_bin_dir + print("Testing install.py ... Expect deno installed to ", expected_bin_dir) if os.path.exists(expected_bin_dir): shutil.rmtree(expected_bin_dir) expected_fn = os.path.join(expected_bin_dir, "deno") @@ -23,9 +24,9 @@ def main(): out = subprocess.check_output(cmd, universal_newlines=True) actual_fn = None for line in out.splitlines(): - print line + print(line) if PATTERN in line: - print "set actual" + print("set actual") actual_fn = line[len(PATTERN):] assert actual_fn == expected_fn, "actual %s != expected %s" % (actual_fn, expected_fn)