Skip to content

Commit

Permalink
Cleaned up assertRaises in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eytanadler committed Aug 11, 2022
1 parent 580ea8e commit 6ea79bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openconcept/mission/tests/test_trajectories.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def setUp(self):
self.p = om.Problem(model=self.TestPhase(num_nodes=self.nn))

def test_asserts(self):
with self.assertRaises(ValueError) as _:
with self.assertRaises(ValueError):
self.p.setup(force_alloc_complex=True)


Expand Down Expand Up @@ -569,7 +569,7 @@ def setUp(self):
self.p = om.Problem(model=phase)

def test_raises_error(self):
with self.assertRaises(NameError) as _:
with self.assertRaises(NameError):
self.p.setup()


Expand Down Expand Up @@ -932,7 +932,7 @@ def test_raises(self):

traj.add_subsystem("phase1", PhaseForTrajTest(num_nodes=5))

with self.assertRaises(ValueError) as _:
with self.assertRaises(ValueError):
traj.link_phases("phase1", "phase2", states_to_skip=["b.ode_integ.f"])


Expand Down

0 comments on commit 6ea79bf

Please sign in to comment.