print(f"{indent}<style>")
indent += " "
print(f"{indent}table {{text-align: left; white-space: nowrap; position: relative;}}")
- print(f"{indent}thead tr th {{padding-right: 1em; padding-bottom: 5px; position: sticky; top: 0px; background-color: white;}}")
+ print(f"{indent}thead tr th {{padding-right: 1em; padding-bottom: 5px; "
+ "position: sticky; top: 0px; background-color: white;}")
print(f"{indent}td, th {{padding-left: 1.5em;}}")
indent = indent[:-2]
print(f"{indent}</style>")
"%Y-%m-%d %H:%M:%S",
).strftime(date_format)
except (subprocess.CalledProcessError, FileNotFoundError):
- print("Warning: build not started in a Git clone, or Git is not installed: setting version date to 0.", file=sys.stderr)
+ sys.stderr.write("Warning: build not started in a Git clone, or Git is not "
+ "installed: setting version date to 0.\n")
committer_date = "0"
if not patch_version.isnumeric():
elif os.path.exists(os.path.join(REFDIR, OUTFILE)):
doDiff(OUTFILE, OUTDIR, REFDIR, TESTNAME, i, SUBTEST["FMT"])
else:
- print(f"Test {TESTNAME}:{i} : == No file {REFDIR}/{OUTFILE} for comparison ==", file=sys.stderr)
+ sys.stderr.write(f"Test {TESTNAME}:{i} : == No file {REFDIR}/{OUTFILE} "
+ "for comparison ==\n")
# clear TESTTYPES
TESTTYPES = {}
\r
\r
class TestLargeGraphs():\r
- @pytest.mark.skipif(platform.system() == "Windows" and platform.architecture()[0] == "32bit", reason="https://gitlab.com/graphviz/graphviz/-/issues/1710")\r
+ @pytest.mark.skipif(platform.system() == "Windows" and\r
+ platform.architecture()[0] == "32bit",\r
+ reason="https://gitlab.com/graphviz/graphviz/-/issues/1710")\r
def test_long_chain(self):\r
"""\r
This test will fail on 32bit Windows machine if compiled with stack size < 16MB.\r
with open(filename_output) as output_file:
reference = reference_file.readlines()
output = output_file.readlines()
- diff_generator = difflib.context_diff(output, reference, str(filename_output), str(filename_reference))
+ diff_generator = difflib.context_diff(output, reference,
+ str(filename_output),
+ str(filename_reference))
# if diff contains at least one line, the files are different
diff = []
class Test_File():
@pytest.mark.parametrize(
- "shape,output_type", [(shape, output_type) for shape in shapes for output_type in output_types]
+ "shape,output_type", [(shape, output_type) for shape in shapes
+ for output_type in output_types]
)
def test_shape(self, shape, output_type):
os.chdir(Path(__file__).resolve().parent)