|
4 | 4 | from sys import platform |
5 | 5 | from typing import Sequence |
6 | 6 |
|
7 | | -from pyprojroot.here import here |
8 | 7 | from copier import run_copy |
9 | 8 | import pytest |
10 | 9 |
|
@@ -57,27 +56,17 @@ def project_env_bin_dir(tmp_path_factory): |
57 | 56 |
|
58 | 57 |
|
59 | 58 | @pytest.fixture(scope='session') |
60 | | -# def baked_with_development_dependencies(tmp_path_factory, project_env_bin_dir, copier_project_defaults): |
61 | | -# project_defaults = copier_project_defaults |
62 | | -# project = run_copy( |
63 | | -# src_path=str(here()), |
64 | | -# dst_path=str(tmp_path_factory.mktemp('projects')), |
65 | | -# defaults=True, |
66 | | -# vcs_ref="HEAD", |
67 | | -# data=project_defaults |
68 | | -# ) |
69 | | -# project_dir = project.dst_path |
70 | | - |
71 | 59 | def baked_with_development_dependencies(copie_session, project_env_bin_dir, copier_project_defaults): |
72 | 60 | result = copie_session.copy(extra_answers=copier_project_defaults) |
73 | 61 | assert result.exit_code == 0 |
| 62 | + project_dir = result.project_dir |
74 | 63 |
|
75 | 64 | bin_dir = project_env_bin_dir |
76 | | - latest_pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools'], result.project_dir) |
| 65 | + latest_pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools'], project_dir) |
77 | 66 | assert latest_pip_output.returncode == 0 |
78 | | - pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--editable', '.[dev]'], result.project_dir) |
| 67 | + pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--editable', '.[dev]'], project_dir) |
79 | 68 | assert pip_output.returncode == 0 |
80 | | - return result.project_dir |
| 69 | + return project_dir |
81 | 70 |
|
82 | 71 |
|
83 | 72 | def test_pytest(baked_with_development_dependencies, project_env_bin_dir): |
|
0 commit comments