File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 9
9
import pandas
10
10
11
11
dummy_backend = types .ModuleType ("pandas_dummy_backend" )
12
- dummy_backend .plot = lambda * args , ** kwargs : None
12
+ dummy_backend .plot = lambda * args , ** kwargs : 'used_dummy'
13
13
14
14
15
15
@pytest .fixture
@@ -38,6 +38,16 @@ def test_backend_is_correct(monkeypatch, restore_backend):
38
38
)
39
39
40
40
41
+ def test_backend_can_be_set_in_plot_call (monkeypatch , restore_backend ):
42
+ monkeypatch .setitem (sys .modules , "pandas_dummy_backend" , dummy_backend )
43
+ df = pandas .DataFrame ([1 ,2 ,3 ])
44
+
45
+ assert pandas .get_option ("plotting.backend" ) == "matplotlib"
46
+ assert (
47
+ df .plot (backend = 'pandas_dummy_backend' ) == 'used_dummy'
48
+ )
49
+
50
+
41
51
@td .skip_if_no_mpl
42
52
def test_register_entrypoint (restore_backend ):
43
53
You can’t perform that action at this time.
0 commit comments