Skip to content

Commit

Permalink
Adding a test in test_shaft.py and the raise documentation in shaft.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ggurioli committed May 18, 2021
1 parent 8303d49 commit 6b5e121
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bladex/shaft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_shaft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6b5e121

Please sign in to comment.