From 38811a4495953bba8e7f08cccd5ca04a90228fcf Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Sat, 8 Jan 2022 14:35:42 +0100 Subject: [PATCH] Fix check consistent (#6860) --- tests/check_consistent.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 105d838b0..cf1d4ac21 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -179,11 +179,10 @@ def check_metadata(): assert ";" not in dep, f"Semicolons in dependencies are not supported, got {dep}" stripped, relation, dep_version = _strip_dep_version(dep) if relation: - msg = f"Bad version in dependency {dep}" - assert relation in {"==", ">", ">=", "<", "<="}, msg - assert version.count(".") <= 2, msg - for part in version.split("."): - assert part.isnumeric(), msg + assert relation in {"==", ">", ">=", "<", "<="}, f"Bad relation '{relation}' in dependency {dep}" + assert dep_version.count(".") <= 2, f"Bad version '{dep_version}' in dependency {dep}" + for part in dep_version.split("."): + assert part.isnumeric(), f"Bad version '{part}' in dependency {dep}" if __name__ == "__main__":