diff --git a/tests/test_style.py b/tests/test_style.py index 74c1333..3d8cd87 100644 --- a/tests/test_style.py +++ b/tests/test_style.py @@ -1,5 +1,6 @@ import os import subprocess +import sys import unittest @@ -15,7 +16,7 @@ class TestStyle(unittest.TestCase): This test runs flake8 on the code, and will fail if it returns a non-zero exit code. """ # We ignore E712, which disallows non-identity comparisons with True and False - flake8_command = ['flake8', '--ignore=E712,W503', REPO_PATH] + flake8_command = [sys.executable, '-m', 'flake8', '--ignore=E712,W503', REPO_PATH] self.assertEqual(subprocess.call(flake8_command), 0)