|
39 | 39 | 'eps afm',
|
40 | 40 | 'eps with usetex'
|
41 | 41 | ])
|
42 |
| -def test_savefig_to_stringio(format, use_log, rcParams, orientation, |
43 |
| - monkeypatch): |
| 42 | +def test_savefig_to_stringio(format, use_log, rcParams, orientation): |
44 | 43 | mpl.rcParams.update(rcParams)
|
45 |
| - monkeypatch.setenv("SOURCE_DATE_EPOCH", "0") # For reproducibility. |
46 | 44 |
|
47 | 45 | fig, ax = plt.subplots()
|
48 | 46 |
|
@@ -70,12 +68,11 @@ def test_savefig_to_stringio(format, use_log, rcParams, orientation,
|
70 | 68 | s_val = s_buf.getvalue().encode('ascii')
|
71 | 69 | b_val = b_buf.getvalue()
|
72 | 70 |
|
73 |
| - if rcParams.get("ps.usedistiller") or rcParams.get("text.usetex"): |
74 |
| - # Strip out CreationDate betcase ghostscript doesn't obey |
75 |
| - # SOURCE_DATE_EPOCH. Note that in usetex mode, we *always* call |
76 |
| - # gs_distill, even if ps.usedistiller is unset. |
77 |
| - s_val = re.sub(b"(?<=\n%%CreationDate: ).*", b"", s_val) |
78 |
| - b_val = re.sub(b"(?<=\n%%CreationDate: ).*", b"", b_val) |
| 71 | + # Strip out CreationDate: ghostscript and cairo don't obey |
| 72 | + # SOURCE_DATE_EPOCH, and that environment variable is already tested in |
| 73 | + # test_determinism. |
| 74 | + s_val = re.sub(b"(?<=\n%%CreationDate: ).*", b"", s_val) |
| 75 | + b_val = re.sub(b"(?<=\n%%CreationDate: ).*", b"", b_val) |
79 | 76 |
|
80 | 77 | assert s_val == b_val.replace(b'\r\n', b'\n')
|
81 | 78 |
|
|
0 commit comments