(shell_pylab_fixture)
| 279 | |
| 280 | @dec.skipif(not pt._matplotlib_manages_backends()) |
| 281 | def test_backend_module_name_case_sensitive(shell_pylab_fixture): |
| 282 | # Matplotlib backend names are case insensitive unless explicitly specified using |
| 283 | # "module://some_module.some_name" syntax which are case sensitive for mpl >= 3.9.1 |
| 284 | all_lowercase = "module://matplotlib_inline.backend_inline" |
| 285 | some_uppercase = "module://matplotlib_inline.Backend_inline" |
| 286 | mpl3_9_1 = matplotlib.__version_info__ >= (3, 9, 1) |
| 287 | |
| 288 | s = shell_pylab_fixture |
| 289 | s.enable_matplotlib(all_lowercase) |
| 290 | if mpl3_9_1: |
| 291 | with pytest.raises(RuntimeError): |
| 292 | s.enable_matplotlib(some_uppercase) |
| 293 | else: |
| 294 | s.enable_matplotlib(some_uppercase) |
| 295 | |
| 296 | s.run_line_magic("matplotlib", all_lowercase) |
| 297 | if mpl3_9_1: |
| 298 | with pytest.raises(RuntimeError): |
| 299 | s.run_line_magic("matplotlib", some_uppercase) |
| 300 | else: |
| 301 | s.run_line_magic("matplotlib", some_uppercase) |
| 302 | |
| 303 | |
| 304 | def test_no_gui_backends(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…