diff --git a/.gitignore b/.gitignore index 81bfd1d..809bd04 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__ *.egg-info temp docsrc/build +temp diff --git a/mplStrater/__init__.py b/mplStrater/__init__.py index 2d3b8c6..b85d935 100644 --- a/mplStrater/__init__.py +++ b/mplStrater/__init__.py @@ -7,7 +7,7 @@ import rio_color.operations as rio from rio_color.colorspace import ColorSpace as cs from rio_color.colorspace import convert_arr -from mplStrater.strata import * +from mplStrater.strata import Column import matplotlib.patheffects as pe from matplotlib.gridspec import GridSpec diff --git a/mplStrater/strata.py b/mplStrater/strata.py index 3dcfc81..15cb437 100644 --- a/mplStrater/strata.py +++ b/mplStrater/strata.py @@ -33,7 +33,7 @@ def __init__(self,d=None,colors=None,hatches=None): elif hatches is not None and colors is None: self.hatches=hatches else: - ValueError("This symbology profile is not implemented.") + raise ValueError("This symbology profile is not implemented.") class Legend: """ diff --git a/tests/test_strata.py b/tests/test_strata.py index eb3b4c8..a18f389 100644 --- a/tests/test_strata.py +++ b/tests/test_strata.py @@ -1,7 +1,7 @@ import unittest from matplotlib.colors import ListedColormap from numpy import less_equal -from mplStrater.strata import * +from mplStrater.strata import Symbology,Legend,Column class TestSymbology(unittest.TestCase): @@ -22,15 +22,13 @@ def test_hatches(self): def test_error(self): #test error input + d={} hatches=["","xxxxxxxxx",""] colors=["green","white","blue"] self.assertRaises( ValueError, - Symbology(d={},colors=colors,hatches=hatches) - ) - - - + Symbology, + d,colors=colors,hatches=hatches) class TestLegend(unittest.TestCase):