Skip to content

Commit a0a9432

Browse files
committed
remove copied fixtures
1 parent 2e8dc23 commit a0a9432

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

tests/integration/test_main.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import json
4-
import os
54
import pathlib
65
import subprocess
76
import uuid
@@ -10,50 +9,6 @@
109

1110
from coverage_comment import main
1211

13-
14-
@pytest.fixture
15-
def in_integration_env(integration_env, integration_dir):
16-
curdir = os.getcwd()
17-
os.chdir(integration_dir)
18-
yield integration_dir
19-
os.chdir(curdir)
20-
21-
22-
@pytest.fixture
23-
def integration_dir(tmp_path: pathlib.Path):
24-
test_dir = tmp_path / "integration_test"
25-
test_dir.mkdir()
26-
return test_dir
27-
28-
29-
@pytest.fixture
30-
def file_path(integration_dir):
31-
return integration_dir / "foo.py"
32-
33-
34-
@pytest.fixture
35-
def write_file(file_path):
36-
def _(*variables):
37-
content = "import os"
38-
for i, var in enumerate(variables):
39-
content += f"""\nif os.environ.get("{var}"):\n {i}\n"""
40-
file_path.write_text(content, encoding="utf8")
41-
42-
return _
43-
44-
45-
@pytest.fixture
46-
def run_coverage(file_path, integration_dir):
47-
def _(*variables):
48-
subprocess.check_call(
49-
["coverage", "run", "--parallel", file_path.name],
50-
cwd=integration_dir,
51-
env=os.environ | dict.fromkeys(variables, "1"),
52-
)
53-
54-
return _
55-
56-
5712
DIFF_STDOUT = """diff --git a/foo.py b/foo.py
5813
index 6c08c94..b65c612 100644
5914
--- a/foo.py

0 commit comments

Comments
 (0)