Skip to content

Commit 62b7683

Browse files
author
Alan Christie
committed
fix: Execution for non-grouped tests
1 parent 460ad7d commit 62b7683

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/jote/jote.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ def _load(
287287
# and into 'grouped_job_definitions' if it has at least one grouped test.
288288
for jd_name in jd_munch.jobs:
289289
test_run_group_names: List[str] = []
290-
has_tests_without_groups: bool = False
291290
if jd_munch.jobs[jd_name].tests:
292291
# Job has some tests
293292
num_tests += len(jd_munch.jobs[jd_name].tests)
@@ -310,12 +309,6 @@ def _load(
310309
)
311310
return [], {}, -3
312311
test_run_group_names.append(run_group.name)
313-
else:
314-
has_tests_without_groups = True
315-
# A single job can have tests that are required to run in groups
316-
# and tests that can run without groups.
317-
if has_tests_without_groups:
318-
job_definitions.append(jd_munch.jobs[jd_name])
319312
if test_run_group_names:
320313
_add_grouped_test(
321314
jd_path,
@@ -327,6 +320,9 @@ def _load(
327320
grouped_job_definitions,
328321
)
329322

323+
# Job definitions is simply a copy of the whole decoded file.
324+
job_definitions.append(jd_munch)
325+
330326
return job_definitions, grouped_job_definitions, num_tests
331327

332328

@@ -1280,6 +1276,8 @@ def main() -> int:
12801276
if args.job and not args.job == job_name:
12811277
continue
12821278

1279+
# Skip any test that has a run-group defined.
1280+
# These will be handled sepratately.
12831281
if job_definition.jobs[job_name].tests:
12841282
(
12851283
num_passed,
@@ -1303,7 +1301,7 @@ def main() -> int:
13031301
break
13041302

13051303
# Break out of this loop if told to stop on failures
1306-
if num_failed > 0 and args.exit_on_failure:
1304+
if total_failed_count > 0 and args.exit_on_failure:
13071305
break
13081306

13091307
# Success so far.

0 commit comments

Comments
 (0)