Skip to content

Commit 1da0804

Browse files
committed
Fix project-template tests to run against unreleased PTB code
1 parent bc4a21d commit 1da0804

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

doc/changes/unreleased.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ be added (project-specific or globally), see the
77
## Refactoring
88

99
* #517: Refactored `dependency:audit` & split up to support upcoming work
10+
11+
## Bugfix
12+
13+
* #533: Fixed project-template tests to run with unreleased PTB to better detect issues pre-release

test/integration/project-template/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import pytest
55

6-
from noxconfig import Config
6+
from noxconfig import PROJECT_CONFIG
77

88

99
@pytest.fixture(scope="session", autouse=True)
@@ -18,16 +18,18 @@ def new_project(cwd):
1818
package_name = "package"
1919

2020
subprocess.run(
21-
["cookiecutter", Config.root / "project-template", "-o", cwd, "--no-input",
21+
["cookiecutter", PROJECT_CONFIG.root / "project-template", "-o", cwd, "--no-input",
2222
f"project_name={project_name}", f"repo_name={repo_name}",
2323
f"package_name={package_name}",
2424
], capture_output=True, check=True)
2525

2626
return cwd / repo_name
2727

28+
2829
@pytest.fixture(scope="session", autouse=True)
2930
def poetry_install(run_command, poetry_path):
3031
run_command([poetry_path, "install"])
32+
run_command([poetry_path, "add", "--group", "dev", PROJECT_CONFIG.root])
3133

3234

3335
@pytest.fixture(scope="session")
@@ -37,8 +39,6 @@ def git_path() -> str:
3739
return git_path
3840

3941

40-
41-
4242
@pytest.fixture(scope="session")
4343
def run_command(poetry_path, git_path, new_project):
4444
"""

0 commit comments

Comments
 (0)