Skip to content

Commit 012179d

Browse files
committed
chore: why is it hard to create releases.
1 parent 65fa376 commit 012179d

File tree

3 files changed

+7
-38
lines changed

3 files changed

+7
-38
lines changed

src/cli/pytest_commands/fill.py

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ def create_executions(self, pytest_args: List[str]) -> List[PytestExecution]:
3232
processed_args = self.process_arguments(pytest_args)
3333

3434
# Check if we need two-phase execution
35-
if self._should_use_two_phase_execution(processed_args):
36-
processed_args = self._ensure_generate_all_formats_for_tarball(processed_args)
37-
return self._create_two_phase_executions(processed_args)
38-
elif "--use-pre-alloc-groups" in processed_args:
35+
if "--use-pre-alloc-groups" in processed_args:
3936
# Only phase 2: using existing pre-allocation groups
4037
return self._create_single_phase_with_pre_alloc_groups(processed_args)
4138
else:
@@ -47,27 +44,6 @@ def create_executions(self, pytest_args: List[str]) -> List[PytestExecution]:
4744
)
4845
]
4946

50-
def _create_two_phase_executions(self, args: List[str]) -> List[PytestExecution]:
51-
"""Create two-phase execution: pre-allocation group generation + fixture filling."""
52-
# Phase 1: Pre-allocation group generation (clean and minimal output)
53-
phase1_args = self._create_phase1_args(args)
54-
55-
# Phase 2: Main fixture generation (full user options)
56-
phase2_args = self._create_phase2_args(args)
57-
58-
return [
59-
PytestExecution(
60-
config_file=self.config_path,
61-
args=phase1_args,
62-
description="generating pre-allocation groups",
63-
),
64-
PytestExecution(
65-
config_file=self.config_path,
66-
args=phase2_args,
67-
description="filling test fixtures",
68-
),
69-
]
70-
7147
def _create_single_phase_with_pre_alloc_groups(self, args: List[str]) -> List[PytestExecution]:
7248
"""Create single execution using existing pre-allocation groups."""
7349
return [
@@ -155,12 +131,6 @@ def _should_use_two_phase_execution(self, args: List[str]) -> bool:
155131
or self._is_tarball_output(args)
156132
)
157133

158-
def _ensure_generate_all_formats_for_tarball(self, args: List[str]) -> List[str]:
159-
"""Auto-add --generate-all-formats for tarball output."""
160-
if self._is_tarball_output(args) and "--generate-all-formats" not in args:
161-
return args + ["--generate-all-formats"]
162-
return args
163-
164134
def _is_tarball_output(self, args: List[str]) -> bool:
165135
"""Check if output argument specifies a tarball (.tar.gz) path."""
166136
from pathlib import Path

src/pytest_plugins/filler/filler.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ def pytest_configure(config):
391391
args[i] = f'"{args[i]}"'
392392
command_line_args = " ".join(args)
393393
config.stash[metadata_key]["Command-line args"] = f"<code>{command_line_args}</code>"
394+
config.option.generate_pre_alloc_groups = False
395+
config.option.use_pre_alloc_groups = False
396+
config.option.generate_all_formats = False
394397

395398

396399
@pytest.hookimpl(trylast=True)
@@ -1065,11 +1068,9 @@ def pytest_generate_tests(metafunc: pytest.Metafunc):
10651068
"""
10661069
for test_type in BaseTest.spec_types.values():
10671070
if test_type.pytest_parameter_name() in metafunc.fixturenames:
1068-
generate_pre_alloc_groups = metafunc.config.getoption(
1069-
"generate_pre_alloc_groups", False
1070-
)
1071-
use_pre_alloc_groups = metafunc.config.getoption("use_pre_alloc_groups", False)
1072-
generate_all_formats = metafunc.config.getoption("generate_all_formats", False)
1071+
generate_pre_alloc_groups = False
1072+
use_pre_alloc_groups = False
1073+
generate_all_formats = False
10731074

10741075
execution_phase = _determine_execution_phase(
10751076
generate_pre_alloc_groups, use_pre_alloc_groups, generate_all_formats

src/pytest_plugins/filler/fixture_output.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ def create_tarball(self) -> None:
212212
def from_config(cls, config: pytest.Config) -> "FixtureOutput":
213213
"""Create a FixtureOutput instance from pytest configuration."""
214214
output_path = Path(config.getoption("output"))
215-
should_generate_all_formats = config.getoption("generate_all_formats")
216215

217216
return cls(
218217
output_path=output_path,
@@ -221,5 +220,4 @@ def from_config(cls, config: pytest.Config) -> "FixtureOutput":
221220
clean=config.getoption("clean"),
222221
generate_pre_alloc_groups=config.getoption("generate_pre_alloc_groups"),
223222
use_pre_alloc_groups=config.getoption("use_pre_alloc_groups"),
224-
should_generate_all_formats=should_generate_all_formats,
225223
)

0 commit comments

Comments
 (0)