Skip to content
Snippets Groups Projects

Merge "Write tests" branch into master

Merged Wishyut (Jake Pita) requested to merge 18-write-tests into master
1 file
+ 15
1
Compare changes
  • Side-by-side
  • Inline
+ 15
1
@@ -5,6 +5,7 @@ from Plotter import Plotter
import pandas as pd
import pytest
import matplotlib.pyplot as plt
this_file_dir = Path(__file__).parent
@@ -46,7 +47,20 @@ def test_catch_styling_params_not_dict(the_plotter: Plotter, param):
"""Tests that functions that take styling_params correctly
catch non dictionaries."""
with pytest.raises(ValueError):
the_plotter.distribution_plot("GAD_T", param)
the_plotter.plot_categorical_bar_chart("GAD_T", "GAD_T", param)
with pytest.raises(ValueError):
the_plotter.plot_categorical_histplot("GAD_T", "GAD_T", param)
with pytest.raises(ValueError):
the_plotter.plot_scatterplot("GAD_T", "GAD_T", param)
def test_catch_plotter_init_not_Dataset():
"""Tests that the Plotter's init actually takes a Dataset."""
with pytest.raises(ValueError):
p = Plotter("not-a-Dataset")
def test_customize_plot(the_plotter: Plotter):
fig, ax = plt.subplots()
the_plotter.customize_plot(fig, ax, {"title": "a"})
assert True
Loading