Closed
Description
This only seems to happen on appveyor.
_____________________ test_determinism_check[h-pdf-False] _____________________
4497[gw0] win32 -- Python 3.7.6 c:\miniconda37-x64\envs\test-environment\python.exe
4498
4499objects = 'h', fmt = 'pdf', usetex = False
4500
4501 @pytest.mark.parametrize(
4502 "objects, fmt, usetex", [
4503 ("", "pdf", False),
4504 ("m", "pdf", False),
4505 ("h", "pdf", False),
4506 ("i", "pdf", False),
4507 ("mhi", "pdf", False),
4508 ("mhi", "ps", False),
4509 pytest.param(
4510 "mhi", "ps", True, marks=[needs_usetex, needs_ghostscript]),
4511 ("mhi", "svg", False),
4512 pytest.param("mhi", "svg", True, marks=needs_usetex),
4513 ]
4514 )
4515 def test_determinism_check(objects, fmt, usetex):
4516 """
4517 Output three times the same graphs and checks that the outputs are exactly
4518 the same.
4519
4520 Parameters
4521 ----------
4522 objects : str
4523 Objects to be included in the test document: 'm' for markers, 'h' for
4524 hatch patterns, 'i' for images.
4525 fmt : {"pdf", "ps", "svg"}
4526 Output format.
4527 """
4528 plots = [
4529 subprocess.check_output(
4530 [sys.executable, "-R", "-c",
4531 f"from matplotlib.tests.test_determinism import _save_figure;"
4532 f"_save_figure({objects!r}, {fmt!r}, {usetex})"],
4533 env={**os.environ, "SOURCE_DATE_EPOCH": "946684800"})
4534 for _ in range(3)
4535 ]
4536 for p in plots[1:]:
4537 if fmt == "ps" and usetex:
4538 if p != plots[0]:
4539 pytest.skip("failed, maybe due to ghostscript timestamps")
4540 else:
4541> assert p == plots[0]
4542E AssertionError: assert b'%PDF-1.4\n%...4191\n%%EOF\n' == b'%PDF-1.4\n%...4181\n%%EOF\n'
4543E At index 34337 diff: b'.' != b'+'
4544E Use -v to get the full diff
4545
4546lib\matplotlib\tests\test_determinism.py:111: AssertionError
4547---------------------------- Captured stderr call -----------------------------
4548usetex mode requires TeX.
4549usetex mode requires TeX.
4550usetex mode requires TeX.
4551
4552