Skip to content

test_package issue: subprocess.run needs shell=True #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmdunla opened this issue Apr 14, 2023 · 0 comments · Fixed by #87
Closed

test_package issue: subprocess.run needs shell=True #84

dmdunla opened this issue Apr 14, 2023 · 0 comments · Fixed by #87

Comments

@dmdunla
Copy link
Collaborator

dmdunla commented Apr 14, 2023

On some systems (e.g. Mac), calls to subprocess.run() must include shell=True:

==================================================================================================== short test summary info ====================================================================================================
FAILED tests/test_package.py::test_formatting - FileNotFoundError: [Errno 2] No such file or directory: 'isort <PATH>/pyttb --check --settings-path <PATH>/pyttb'
FAILED tests/test_package.py::test_linting - FileNotFoundError: [Errno 2] No such file or directory: 'pylint <PATH>/pyttb/pyttb/tensor.py <PATH>/pyttb/pyttb/sptensor.py <PATH>/pyttb/pyttb/pyttb_ut...
FAILED tests/test_package.py::test_typing - FileNotFoundError: [Errno 2] No such file or directory: 'mypy -p pyttb  --config-file <PATH>/pyttb/pyproject.toml'
=========================================================================================== 3 failed, 336 passed, 7 warnings in 1.69s ===========================================================================================

Example fix:

subprocess.run(f"isort {root_dir} --check --settings-path {root_dir}", check=True, shell=True)
@dmdunla dmdunla linked a pull request Apr 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant