Skip to content

Commit f8a1b21

Browse files
committed
refactor(tests): use BOOTSTRAP_SCRIPT variable for script path
1 parent 7dad4c6 commit f8a1b21

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

tests/test_bootstrap_template.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
import sys
33
from pathlib import Path
44

5+
BOOTSTRAP_SCRIPT = (
6+
Path(__file__).resolve().parents[1] / "scripts" / ("bootstrap_template.py")
7+
)
8+
59

610
def test_bootstrap_template_renames_placeholders(tmp_path: Path) -> None:
711
repo_dir = tmp_path / "demo-service"
@@ -71,11 +75,7 @@ def test_bootstrap_template_renames_placeholders(tmp_path: Path) -> None:
7175
subprocess.run(
7276
[
7377
sys.executable,
74-
str(
75-
Path(
76-
"/home/sebastiano/python-template/scripts/bootstrap_template.py"
77-
)
78-
),
78+
str(BOOTSTRAP_SCRIPT),
7979
"demo-service",
8080
"--author",
8181
"Ada Lovelace",
@@ -151,11 +151,7 @@ def test_bootstrap_template_uses_custom_package_name(tmp_path: Path) -> None:
151151
subprocess.run(
152152
[
153153
sys.executable,
154-
str(
155-
Path(
156-
"/home/sebastiano/python-template/scripts/bootstrap_template.py"
157-
)
158-
),
154+
str(BOOTSTRAP_SCRIPT),
159155
"demo-service",
160156
"--package-name",
161157
"custom_pkg",
@@ -217,11 +213,7 @@ def test_bootstrap_template_uses_github_metadata(tmp_path: Path) -> None:
217213
subprocess.run(
218214
[
219215
sys.executable,
220-
str(
221-
Path(
222-
"/home/sebastiano/python-template/scripts/bootstrap_template.py"
223-
)
224-
),
216+
str(BOOTSTRAP_SCRIPT),
225217
"--from-github",
226218
],
227219
cwd=repo_dir,

0 commit comments

Comments
 (0)