|
8 | 8 |
|
9 | 9 | @pytest.mark.parametrize("layout", LAYOUTS) |
10 | 10 | def test_correct_func(layout): |
11 | | - rc_params, width_in, height_in = get_mpl_rcParams(1, 0.15, layout) |
| 11 | + rc_params, width_in, height_in = get_mpl_rcParams( |
| 12 | + width_frac=1, height_frac=0.15, layout=layout |
| 13 | + ) |
12 | 14 | plt.rcParams.update(rc_params) |
13 | 15 |
|
14 | 16 |
|
15 | 17 | def test_incorrect_width(): |
16 | 18 | with pytest.raises(ValueError): |
17 | | - _, _, _ = get_mpl_rcParams(12, 0.1, "iclr") |
| 19 | + _, _, _ = get_mpl_rcParams(width_frac=12, height_frac=0.1, layout="iclr") |
18 | 20 |
|
19 | 21 | with pytest.raises(ValueError): |
20 | | - _, _, _ = get_mpl_rcParams(0, 0.1, "iclr") |
| 22 | + _, _, _ = get_mpl_rcParams(width_frac=0, height_frac=0.1, layout="iclr") |
21 | 23 |
|
22 | 24 | with pytest.raises(ValueError): |
23 | | - _, _, _ = get_mpl_rcParams(-3.2, 0.1, "iclr") |
| 25 | + _, _, _ = get_mpl_rcParams(width_frac=-3.2, height_frac=0.1, layout="iclr") |
24 | 26 |
|
25 | 27 |
|
26 | 28 | def test_incorrect_height(): |
27 | 29 | with pytest.raises(ValueError): |
28 | | - _, _, _ = get_mpl_rcParams(0.15, 12, "iclr") |
| 30 | + _, _, _ = get_mpl_rcParams(width_frac=0.15, height_frac=12, layout="iclr") |
29 | 31 |
|
30 | 32 | with pytest.raises(ValueError): |
31 | | - _, _, _ = get_mpl_rcParams(0.15, 0, "iclr") |
| 33 | + _, _, _ = get_mpl_rcParams(width_frac=0.15, height_frac=0, layout="iclr") |
32 | 34 |
|
33 | 35 | with pytest.raises(ValueError): |
34 | | - _, _, _ = get_mpl_rcParams(0.15, -1.2, "iclr") |
| 36 | + _, _, _ = get_mpl_rcParams(width_frac=0.15, height_frac=-1.2, layout="iclr") |
35 | 37 |
|
36 | 38 |
|
37 | 39 | def test_incorrect_layout(): |
38 | 40 | with pytest.raises(ValueError): |
39 | | - _, _, _ = get_mpl_rcParams(1, 1, "predatory_journal") |
| 41 | + _, _, _ = get_mpl_rcParams( |
| 42 | + width_frac=0.5, height_frac=0.5, layout="predatory_journal" |
| 43 | + ) |
0 commit comments