39fb7b5b96ea46aca94099d166106365eaf0647e,lib/matplotlib/tests/test_backend_ps.py,,test_savefig_to_stringio,#Any#Any#Any#,49
Before Change
matplotlib.rcParams.update(rcParams)
fig, ax = plt.subplots()
buffers = [
six.moves.StringIO(),
io.StringIO(),
io.BytesIO()]
if use_log:
ax.set_yscale("log")
ax.plot([1, 2], [1, 2])
ax.set_title(u"Déjà vu")
for buffer in buffers:
fig.savefig(buffer, format=format)
values = [x.getvalue() for x in buffers]
if six.PY3:
values = [
values[0].encode("ascii"),
After Change
fig, ax = plt.subplots()
with io.StringIO() as s_buf, io.BytesIO() as b_buf:
if use_log:
ax.set_yscale("log")
ax.plot([1, 2], [1, 2])
ax.set_title("Déjà vu")
fig.savefig(s_buf, format=format)
fig.savefig(b_buf, format=format)
s_val = s_buf.getvalue().encode("ascii")
b_val = b_buf.getvalue()
// Remove comments from the output. This includes things that could
// change from run to run, such as the time.
s_val, b_val = [re.sub(b"%%.*?\n", b"", x) for x in [s_val, b_val]]
assert s_val == b_val.replace(b"\r\n", b"\n")
def test_patheffects():
with matplotlib.rc_context():
matplotlib.rcParams["path.effects"] = [
patheffects.withStroke(linewidth=4, foreground="w")]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: matplotlib/matplotlib
Commit Name: 39fb7b5b96ea46aca94099d166106365eaf0647e
Time: 2018-03-08
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/tests/test_backend_ps.py
Class Name:
Method Name: test_savefig_to_stringio
Project Name: dpressel/mead-baseline
Commit Name: 78eba7b3f82b8420deac3cd28318dbfead0f9b9e
Time: 2018-10-30
Author: dpressel@gmail.com
File Name: python/baseline/dy/embeddings.py
Class Name: LookupTableEmbeddings
Method Name: encode
Project Name: hanxiao/bert-as-service
Commit Name: d97188ee62bc0627235578485c5df7d3245fa1ed
Time: 2018-12-02
Author: hanhxiao@tencent.com
File Name: example6.py
Class Name:
Method Name: