Skip to content

Commit e171d67

Browse files
committed
Add comment to make clear why env is separately set
1 parent e53c673 commit e171d67

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/project-template/pre_commit_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ def git_path() -> str:
2020

2121
@pytest.fixture(scope="module")
2222
def run_command(poetry_path, git_path, new_project):
23+
"""
24+
Run subprocess command with captured output and a limited environment (env).
25+
26+
We restrict the environment as different systems & tools (i.e. PyCharm) include
27+
environment variables which may supersede the ones provided here. In such cases,
28+
this can lead to a breaking alteration in the PTB poetry environment. Thus,
29+
we provide the minimum information needed to execute the pre-commit command.
30+
"""
31+
2332
def _run_command_fixture(command, **kwargs):
2433
defaults = {
2534
"capture_output": True,

0 commit comments

Comments
 (0)