Skip to content

Commit f5b4783

Browse files
committed
tests: add the expected diff_replace loaded from pytest config in tox.ini
1 parent 961270a commit f5b4783

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

tests/test_plugin_fixture.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,44 @@ def test_nb(nb_regression):
6767
# the following are the defaults for pytest-cov
6868
"cov_source": (),
6969
"cov_config": ".coveragerc",
70+
# expected diff_replace loaded from pytest config in tox.ini
71+
"diff_replace": (
72+
(
73+
"/cells/*/outputs/*/text",
74+
"\\/([A-z0-9-_+]+\\/)*[A-z0-9-_+]+\\.ipynb",
75+
"/.../<filename>.ipynb",
76+
),
77+
(
78+
"/cells/*/outputs/*/text",
79+
"rootdir\\:\\s\\/([A-z0-9-_+]+\\/)*[A-z0-9-_+]+",
80+
"rootdir: /.../<dir>",
81+
),
82+
(
83+
"/cells/*/outputs/*/text",
84+
"in\\s[\\.0-9]+\\sseconds",
85+
"in xxx seconds",
86+
),
87+
(
88+
"/cells/*/outputs/*/text",
89+
"platform\\s(darwin|linux).*\\n",
90+
"platform info ...\\n",
91+
),
92+
(
93+
"/cells/*/outputs/*/text",
94+
"plugins\\:\\s.*\\n",
95+
"plugin info ...\\n",
96+
),
97+
(
98+
"/cells/*/outputs/*/text",
99+
"exec_cwd\\=\\\\\\'\\/([A-z0-9-_+]+\\/)*[A-z0-9-_+]+\\\\\\'",
100+
"exec_cwd=/.../<dir>",
101+
),
102+
(
103+
"/cells/*/outputs/*/traceback",
104+
"\\<ipython\\-input\\-[\\-0-9a-zA-Z]*\\>",
105+
"<ipython-input-XXXX>",
106+
),
107+
),
70108
}
71109
)
72110
)

0 commit comments

Comments
 (0)