diff --git a/bladex/shaft.py b/bladex/shaft.py index b25c6e6..fab87ae 100755 --- a/bladex/shaft.py +++ b/bladex/shaft.py @@ -13,6 +13,7 @@ class Shaft(object): stored shaft information. :cvar string filename: path (with the file extension) of a .stl or .iges file with stored shaft information. + :raises Exception: if the extension in the filename is not in .stl or .iges formats. """ def __init__(self, filename): diff --git a/tests/test_shaft.py b/tests/test_shaft.py index 48dda05..77d18cb 100755 --- a/tests/test_shaft.py +++ b/tests/test_shaft.py @@ -20,7 +20,8 @@ def test_generate_solid_02(self): def test_exception(self): sh = Shaft("tests/test_datasets/parameters.prm") - sh.generate_solid() + with self.assertRaises(Exception): + sh.generate_solid() def test_display_01(self): sh = Shaft("tests/test_datasets/shaft.iges")