if not patch_version.isnumeric():
# Non-numerical patch version; add committer date
- patch_version += "." + committer_date
+ patch_version += f".{committer_date}"
if args.date_format:
if args.definition:
if platform.system() == "Windows" and \
F in ["ps", "gv"] and \
testname in ["clusters", "compound", "rootlabel"]:
- print("Warning: Skipping {0} output comparison for test {1}:{2} : format "
- "{3} because the order of clusters in gv or ps output is not "
- "stable on Windows (#1789)"
- .format(F, testname, subtest_index, fmt),
+ print(f"Warning: Skipping {F} output comparison for test "
+ f"{testname}:{subtest_index} : format {fmt} because the order of "
+ "clusters in gv or ps output is not stable on Windows (#1789)",
file=sys.stderr)
return
if F in ["ps", "ps2"]:
elif platform.system() == "Windows":
REFDIR = "nshare"
else:
- print('Unrecognized system "{0}"'.format(platform.system()), file=sys.stderr)
+ print(f'Unrecognized system "{platform.system()}"', file=sys.stderr)
REFDIR = "nshare"
parser = argparse.ArgumentParser(description="Run regression tests.")
print(line)
# Store diff in file
- with open("difference/" + str(filename), "w") as diff_file:
+ with open(f"difference/{str(filename)}", "w") as diff_file:
diff_file.writelines(diff)
print(f"Failure: {filename} - Generated file does not match reference file.")