@@ -23,19 +23,19 @@ def __init__(self):
23
23
24
24
def create_executions (self , pytest_args : List [str ]) -> List [PytestExecution ]:
25
25
"""
26
- Create execution plan that supports two-phase shared pre-state generation.
26
+ Create execution plan that supports two-phase pre-allocation group generation.
27
27
28
28
Returns single execution for normal filling, or two-phase execution
29
- when --gen-shared -pre is specified.
29
+ when --generate-grouped -pre-allocs is specified.
30
30
"""
31
31
processed_args = self .process_arguments (pytest_args )
32
32
33
33
# Check if we need two-phase execution
34
- if "--generate-shared -pre" in processed_args :
34
+ if "--generate-grouped -pre-allocs " in processed_args :
35
35
return self ._create_two_phase_executions (processed_args )
36
- elif "--use-shared -pre" in processed_args :
37
- # Only phase 2: using existing shared pre-allocation state
38
- return self ._create_single_phase_with_shared_alloc (processed_args )
36
+ elif "--use-grouped -pre-allocs " in processed_args :
37
+ # Only phase 2: using existing pre-allocation groups
38
+ return self ._create_single_phase_with_grouped_pre_allocs (processed_args )
39
39
else :
40
40
# Normal single-phase execution
41
41
return [
@@ -46,8 +46,8 @@ def create_executions(self, pytest_args: List[str]) -> List[PytestExecution]:
46
46
]
47
47
48
48
def _create_two_phase_executions (self , args : List [str ]) -> List [PytestExecution ]:
49
- """Create two-phase execution: shared allocation generation + fixture filling."""
50
- # Phase 1: Shared allocation generation (clean and minimal output)
49
+ """Create two-phase execution: pre- allocation group generation + fixture filling."""
50
+ # Phase 1: Pre- allocation group generation (clean and minimal output)
51
51
phase1_args = self ._create_phase1_args (args )
52
52
53
53
# Phase 2: Main fixture generation (full user options)
@@ -57,7 +57,7 @@ def _create_two_phase_executions(self, args: List[str]) -> List[PytestExecution]
57
57
PytestExecution (
58
58
config_file = self .config_file ,
59
59
args = phase1_args ,
60
- description = "generating shared pre-allocation state " ,
60
+ description = "generating pre-allocation groups " ,
61
61
),
62
62
PytestExecution (
63
63
config_file = self .config_file ,
@@ -66,8 +66,10 @@ def _create_two_phase_executions(self, args: List[str]) -> List[PytestExecution]
66
66
),
67
67
]
68
68
69
- def _create_single_phase_with_shared_alloc (self , args : List [str ]) -> List [PytestExecution ]:
70
- """Create single execution using existing shared pre-allocation state."""
69
+ def _create_single_phase_with_grouped_pre_allocs (
70
+ self , args : List [str ]
71
+ ) -> List [PytestExecution ]:
72
+ """Create single execution using existing pre-allocation groups."""
71
73
return [
72
74
PytestExecution (
73
75
config_file = self .config_file ,
@@ -76,24 +78,24 @@ def _create_single_phase_with_shared_alloc(self, args: List[str]) -> List[Pytest
76
78
]
77
79
78
80
def _create_phase1_args (self , args : List [str ]) -> List [str ]:
79
- """Create arguments for phase 1 (shared allocation generation)."""
81
+ """Create arguments for phase 1 (pre- allocation group generation)."""
80
82
# Start with all args, then remove what we don't want for phase 1
81
83
filtered_args = self ._remove_unwanted_phase1_args (args )
82
84
83
85
# Add required phase 1 flags (with quiet output by default)
84
86
phase1_args = [
85
- "--generate-shared -pre" ,
87
+ "--generate-grouped -pre-allocs " ,
86
88
"-qq" , # Quiet pytest output by default (user -v/-vv/-vvv can override)
87
89
] + filtered_args
88
90
89
91
return phase1_args
90
92
91
93
def _create_phase2_args (self , args : List [str ]) -> List [str ]:
92
94
"""Create arguments for phase 2 (fixture filling)."""
93
- # Remove --generate-shared -pre and --clean, then add --use-shared -pre
94
- phase2_args = self ._remove_generate_shared_pre_flag (args )
95
+ # Remove --generate-grouped -pre-allocs and --clean, then add --use-grouped -pre-allocs
96
+ phase2_args = self ._remove_generate_grouped_pre_allocs_flag (args )
95
97
phase2_args = self ._remove_clean_flag (phase2_args )
96
- phase2_args = self ._add_use_shared_pre_flag (phase2_args )
98
+ phase2_args = self ._add_use_grouped_pre_allocs_flag (phase2_args )
97
99
return phase2_args
98
100
99
101
def _remove_unwanted_phase1_args (self , args : List [str ]) -> List [str ]:
@@ -106,9 +108,9 @@ def _remove_unwanted_phase1_args(self, args: List[str]) -> List[str]:
106
108
"--quiet" ,
107
109
"-qq" ,
108
110
"--tb" ,
109
- # Shared allocation flags (we'll add our own)
110
- "--generate-shared -pre" ,
111
- "--use-shared -pre" ,
111
+ # Pre- allocation group flags (we'll add our own)
112
+ "--generate-grouped -pre-allocs " ,
113
+ "--use-grouped -pre-allocs " ,
112
114
}
113
115
114
116
filtered_args = []
@@ -132,17 +134,17 @@ def _remove_unwanted_phase1_args(self, args: List[str]) -> List[str]:
132
134
133
135
return filtered_args
134
136
135
- def _remove_generate_shared_pre_flag (self , args : List [str ]) -> List [str ]:
136
- """Remove --generate-shared -pre flag from argument list."""
137
- return [arg for arg in args if arg != "--generate-shared -pre" ]
137
+ def _remove_generate_grouped_pre_allocs_flag (self , args : List [str ]) -> List [str ]:
138
+ """Remove --generate-grouped -pre-allocs flag from argument list."""
139
+ return [arg for arg in args if arg != "--generate-grouped -pre-allocs " ]
138
140
139
141
def _remove_clean_flag (self , args : List [str ]) -> List [str ]:
140
142
"""Remove --clean flag from argument list."""
141
143
return [arg for arg in args if arg != "--clean" ]
142
144
143
- def _add_use_shared_pre_flag (self , args : List [str ]) -> List [str ]:
144
- """Add --use-shared -pre flag to argument list."""
145
- return args + ["--use-shared -pre" ]
145
+ def _add_use_grouped_pre_allocs_flag (self , args : List [str ]) -> List [str ]:
146
+ """Add --use-grouped -pre-allocs flag to argument list."""
147
+ return args + ["--use-grouped -pre-allocs " ]
146
148
147
149
148
150
class PhilCommand (FillCommand ):
0 commit comments