|
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 |
|
@@ -56,28 +55,17 @@ def project_env_bin_dir(tmp_path_factory): |
56 | 55 | return str(bin_dir) + os.sep |
57 | 56 |
|
58 | 57 |
|
59 | | -@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 | 58 | def baked_with_development_dependencies(copie_session, project_env_bin_dir, copier_project_defaults): |
72 | 59 | result = copie_session.copy(extra_answers=copier_project_defaults) |
73 | 60 | assert result.exit_code == 0 |
| 61 | + project_dir = result.project_dir |
74 | 62 |
|
75 | 63 | bin_dir = project_env_bin_dir |
76 | | - latest_pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools'], result.project_dir) |
| 64 | + latest_pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools'], project_dir) |
77 | 65 | assert latest_pip_output.returncode == 0 |
78 | | - pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--editable', '.[dev]'], result.project_dir) |
| 66 | + pip_output = run([f'{bin_dir}python', '-m', 'pip', 'install', '--editable', '.[dev]'], project_dir) |
79 | 67 | assert pip_output.returncode == 0 |
80 | | - return result.project_dir |
| 68 | + return project_dir |
81 | 69 |
|
82 | 70 |
|
83 | 71 | def test_pytest(baked_with_development_dependencies, project_env_bin_dir): |
|
0 commit comments