Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust logic of searching last pre-3.0 test and prepend it if no 3.0 test were found #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions firebird/qa/fbtconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def clean_tests():
v30: Version = parse('3.0')
for t in tests:
new_versions = []
last: Version = parse('0.1')
last_pre_30_version: Version = parse('0.1')
last_pre_30 = None
has_30: bool = False
t.id = t.id.replace('-','_')
for v in t.versions:
Expand All @@ -179,15 +180,15 @@ def clean_tests():
if mv > v.firebird_version:
v.firebird_version = mv
#
if last < v.firebird_version:
last = v.firebird_version
if last_pre_30_version < v.firebird_version < v30:
last_pre_30_version = v.firebird_version
last_pre_30 = v
if v.firebird_version >= v30:
has_30 = True
if v.firebird_version == v30:
has_30 = True
new_versions.append(v)
if not has_30:
for v in t.versions:
if v.firebird_version >= last:
new_versions.append(v)
if not has_30 and last_pre_30:
new_versions.insert(0, last_pre_30)
t.versions[:] = new_versions

def list_tests(root_path: Path, verbose: bool=False):
Expand Down