diff --git a/test_autoflake.py b/test_autoflake.py index d730803..5ab4cf8 100755 --- a/test_autoflake.py +++ b/test_autoflake.py @@ -4,7 +4,6 @@ """Test suite for autoflake.""" from __future__ import unicode_literals -from __future__ import print_function import contextlib import io @@ -779,7 +778,8 @@ def test_end_to_end(self): x = os.sep print(x) """) as filename: - process = subprocess.Popen(['./autoflake', + process = subprocess.Popen([sys.executable, + './autoflake', '--imports=fake_foo,fake_bar', filename], stdout=subprocess.PIPE) @@ -800,7 +800,8 @@ def test_end_to_end_with_remove_all_unused_imports(self): x = os.sep print(x) """) as filename: - process = subprocess.Popen(['./autoflake', + process = subprocess.Popen([sys.executable, + './autoflake', '--remove-all', filename], stdout=subprocess.PIPE) @@ -819,7 +820,8 @@ def test_end_to_end_with_error(self): x = os.sep print(x) """) as filename: - process = subprocess.Popen(['./autoflake', + process = subprocess.Popen([sys.executable, + './autoflake', '--imports=fake_foo,fake_bar', '--remove-all', filename],