Commit c0a8dfa
Make IPython partially optional on CI to increase test coverage of figure.py (#1496)
Makes IPython an optional dependency in Continuous Integration
for the minimum dependency stream (Python 3.7/NumPy 1.18),
so that uncovered if-branches in `figure.py` are covered. Tests
which require IPython have a pytest.importorskip line added so
that the test suite doesn't break.
* Install IPython as an optional dependency only for Python 3.9 CI tests
* Add pytest.importorskip ipython to test_figure_show
* Add pytest.importorskip ipython and sphinx_gallery to test_pygmtscrapper
* Skip running the fig.inset doctest's fig.show line
* Add test for fig.show using notebook method when IPython isn't installed
* Add tests for figure's PNG and HTML printable representations
* Provide reason for skipping test_figure_show and test_pygmtscrapper
* Silence pylint protected-access warning on accessing PNG and HTML repr
* Try test figure display external method
* Move pytest.importorskip IPython outside of test_pygmtscrapper
Co-authored-by: Dongdong Tian <[email protected]>1 parent 8414b7e commit c0a8dfa
File tree
4 files changed
+52
-8
lines changed- .github/workflows
- pygmt
- src
- tests
4 files changed
+52
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
| 100 | + | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
12 | | - | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
55 | 78 | | |
56 | 79 | | |
57 | 80 | | |
| |||
159 | 182 | | |
160 | 183 | | |
161 | 184 | | |
| 185 | + | |
162 | 186 | | |
163 | 187 | | |
164 | 188 | | |
| |||
199 | 223 | | |
200 | 224 | | |
201 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
202 | 247 | | |
203 | 248 | | |
204 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments