Commit 30f7b65
committed
update testing helpers
- `@matplotlib.testing.decorators.image_comparison` now prints the path
to the diff image so it is easier to find, so that newcomers know it
exists.
- update `tests.py` to give more information about how it should be run
if matplotlib is not installed already.
- update `matplotlib.test` to return -1 instead of raising ImportErrors
if there are preconditions not met. This allows the error messages to
not be buried by the stack traces, is still a return value which would
signify an error, and does not conflict with the range used by
`pytest.ExitCode` (0-5) allowing callers to distinguish different
pytest error codes from an error starting up pytest
- move the `import pytest` check out of `matplotlib._init_tests` because
it is only called via `matplotlib.test` and via pytest's configure
handler, and it is more appropriate and can be handled more gracefully
if it is checked in `matplotlib.test`1 parent bb75f73 commit 30f7b65
3 files changed
+18
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | 1171 | | |
1178 | 1172 | | |
1179 | 1173 | | |
1180 | 1174 | | |
1181 | 1175 | | |
1182 | 1176 | | |
1183 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1184 | 1184 | | |
1185 | | - | |
| 1185 | + | |
| 1186 | + | |
1186 | 1187 | | |
1187 | 1188 | | |
1188 | 1189 | | |
1189 | 1190 | | |
1190 | 1191 | | |
1191 | 1192 | | |
1192 | 1193 | | |
1193 | | - | |
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
0 commit comments