Skip to content

Commit 62a520f

Browse files
authored
Adding shell=True to subprocess.run() calls (#87)
1 parent 5c6489c commit 62a520f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test_package.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ def test_formatting():
1313

1414
source_dir = os.path.dirname(ttb.__file__)
1515
root_dir = os.path.dirname(source_dir)
16-
subprocess.run(f"isort {root_dir} --check --settings-path {root_dir}", check=True)
17-
subprocess.run(f"black --check {root_dir}", check=True)
16+
subprocess.run(
17+
f"isort {root_dir} --check --settings-path {root_dir}", check=True, shell=True
18+
)
19+
subprocess.run(f"black --check {root_dir}", check=True, shell=True)
1820

1921

2022
@pytest.mark.packaging
@@ -31,7 +33,9 @@ def test_linting():
3133
root_dir = os.path.dirname(os.path.dirname(__file__))
3234
toml_file = os.path.join(root_dir, "pyproject.toml")
3335
subprocess.run(
34-
f"pylint {' '.join(enforced_files)} --rcfile {toml_file} -j0", check=True
36+
f"pylint {' '.join(enforced_files)} --rcfile {toml_file} -j0",
37+
check=True,
38+
shell=True,
3539
)
3640

3741

@@ -40,4 +44,4 @@ def test_typing():
4044
"""Run type checker on package"""
4145
root_dir = os.path.dirname(os.path.dirname(__file__))
4246
toml_file = os.path.join(root_dir, "pyproject.toml")
43-
subprocess.run(f"mypy -p pyttb --config-file {toml_file}", check=True)
47+
subprocess.run(f"mypy -p pyttb --config-file {toml_file}", check=True, shell=True)

0 commit comments

Comments
 (0)