From 6c736459b5505ef2c6bf71f1a611ea8456187991 Mon Sep 17 00:00:00 2001 From: markur <98951648+markur4@users.noreply.github.com> Date: Sun, 26 Nov 2023 17:35:20 +0100 Subject: [PATCH] coverage --- testing/.coveragerc | 4 ++-- tests/conftest.py | 1 + tests/plotedits_test.py | 25 ++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/testing/.coveragerc b/testing/.coveragerc index 430cfd9..9bdfc9b 100644 --- a/testing/.coveragerc +++ b/testing/.coveragerc @@ -6,8 +6,8 @@ source = ; */site-packages -[run] -parallel = true +; [run] +; parallel = true ; omit = tests/* ; branch = true ; source = diff --git a/tests/conftest.py b/tests/conftest.py index e69de29..8b13789 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -0,0 +1 @@ + diff --git a/tests/plotedits_test.py b/tests/plotedits_test.py index b64f7d9..ce51cdf 100644 --- a/tests/plotedits_test.py +++ b/tests/plotedits_test.py @@ -70,8 +70,7 @@ def test_edit_titles_with_func(DF, dims): def test_edit_titles_replace(DF, dims, titles: dict): DA = plst.DataAnalysis(data=DF, dims=dims, verbose=False) if DA.factors_rowcol: #' Need facetting, otherwise no axes - DA.plot() - DA.edit_titles_replace(titles=titles) + (DA.plot().edit_titles_replace(titles=titles)) if __name__ == "__main__": plt.show() else: @@ -81,5 +80,25 @@ def test_edit_titles_replace(DF, dims, titles: dict): if __name__ == "__main__": ipytest.run() -#%% +# %% + +@pytest.mark.parametrize("DF, dims", dac.zipped_ALL) +def test_edit_xy_axis_labels(DF, dims): + DA = plst.DataAnalysis(data=DF, dims=dims, verbose=False) + DA.plot().edit_xy_axis_labels( + x="ui!", + x_lowest_row="rambazamba", + x_notlowest_row="FLOH", + y="Johannes", + y_leftmost_col="Gertrude", + y_notleftmost_col="Hä?", + ) + if __name__ == "__main__": + plt.show() + else: + plt.close("all") + + +if __name__ == "__main__": + ipytest.run()