1313 sys .path .insert (0 , "." )
1414 from tools .toxnox import tox_parameters
1515 from tools .toxnox import extract_opts
16- from tools .toxnox import move_junit_file
1716
1817
1918PYTHON_VERSIONS = [
4342nox .options .tags = ["py-generic-memory-dbm" ]
4443
4544
46- def pifpaf (
45+ def _pifpaf (
4746 cmd : list [str ],
4847 module : str ,
4948 * ,
@@ -156,12 +155,12 @@ def _tests(
156155 )
157156 )
158157
159- pifpaf (
158+ _pifpaf (
160159 pifpaf_cmd ,
161160 "memcached" ,
162161 port = str (next (ports )),
163162 )
164- pifpaf (
163+ _pifpaf (
165164 pifpaf_cmd ,
166165 "memcached" ,
167166 port_env = "TOX_DOGPILE_TLS_PORT" ,
@@ -177,20 +176,20 @@ def _tests(
177176 session .install (
178177 * nox .project .dependency_groups (pyproject , "tests_redis" )
179178 )
180- pifpaf (pifpaf_cmd , "redis" , port = str (next (ports )))
179+ _pifpaf (pifpaf_cmd , "redis" , port = str (next (ports )))
181180 backend_cmd .append ("tests/cache/test_redis_backend.py" )
182181 case "valkey" :
183182 session .install (
184183 * nox .project .dependency_groups (pyproject , "tests_valkey" )
185184 )
186- pifpaf (pifpaf_cmd , "valkey" , port = str (next (ports )))
185+ _pifpaf (pifpaf_cmd , "valkey" , port = str (next (ports )))
187186 backend_cmd .append ("tests/cache/test_valkey_backend.py" )
188187 case "redis_sentinel" :
189188 session .install (
190189 * nox .project .dependency_groups (pyproject , "tests_redis" )
191190 )
192191
193- pifpaf (
192+ _pifpaf (
194193 pifpaf_cmd ,
195194 "redis" ,
196195 port = str (next (ports )),
@@ -206,7 +205,7 @@ def _tests(
206205 session .install (
207206 * nox .project .dependency_groups (pyproject , "tests_valkey" )
208207 )
209- pifpaf (
208+ _pifpaf (
210209 pifpaf_cmd ,
211210 "valkey" ,
212211 port = str (next (ports )),
@@ -224,24 +223,14 @@ def _tests(
224223 posargs , opts = extract_opts (session .posargs , "generate-junit" )
225224
226225 if opts .generate_junit :
227- cmd .extend (["--junitxml" , "junit-tmp.xml" ])
228-
229- try :
230- session .run (* pifpaf_cmd , * cmd , * backend_cmd , * posargs )
231- finally :
232- # name the suites distinctly as well. this is so that when they
233- # get merged we can view each suite distinctly rather than them
234- # getting overwritten with each other since they are running the
235- # same tests
236- if opts .generate_junit :
237- # produce individual junit files that are per-database (or as
238- # close as we can get). jenkins junit plugin will merge all
239- # the files...
240- junit_suffix = "-" .join (targets )
241- junitfile = f"junit-{ junit_suffix } .xml"
242- suite_name = f"pytest-{ junit_suffix } "
243-
244- move_junit_file ("junit-tmp.xml" , junitfile , suite_name )
226+ # produce individual junit files that are per-database (or as
227+ # close as we can get). jenkins junit plugin will merge all
228+ # the files...
229+ junit_suffix = "-" .join (targets )
230+ junitfile = f"junit-{ junit_suffix } .xml"
231+ cmd .extend (["--junitxml" , junitfile ])
232+
233+ session .run (* pifpaf_cmd , * cmd , * backend_cmd , * posargs )
245234
246235
247236@nox .session (name = "pep484" )
0 commit comments