Minor refactoring and add comments

This commit is contained in:
Hsiao-Wei Wang 2021-11-16 00:15:39 +08:00
parent f0bb032eb1
commit 63c9e5ea56
No known key found for this signature in database
GPG Key ID: 1111A8A81778319E
1 changed files with 3 additions and 5 deletions

View File

@ -435,12 +435,10 @@ def with_phases(phases, other_phases=None):
_other_phases = [ALL_FORK_UPGRADES[phase]]
ret = _run_test_case_with_phases(fn, _phases, _other_phases, kw, args, is_fork_transition=True)
else:
# When running pytest, go through `fork_metas`
# When running pytest, go through `fork_metas` instead of using `phases`
for fork_meta in fork_metas:
pre_fork_name = fork_meta.pre_fork_name
post_fork_name = fork_meta.post_fork_name
_phases = [pre_fork_name]
_other_phases = [post_fork_name]
_phases = [fork_meta.pre_fork_name]
_other_phases = [fork_meta.post_fork_name]
ret = _run_test_case_with_phases(fn, _phases, _other_phases, kw, args, is_fork_transition=True)
else:
ret = _run_test_case_with_phases(fn, phases, other_phases, kw, args)