From 6ea79bf15e1e6c19875dd4245a78c2177681ed7d Mon Sep 17 00:00:00 2001 From: eytanadler Date: Thu, 11 Aug 2022 11:44:54 -0400 Subject: [PATCH] Cleaned up assertRaises in tests --- openconcept/mission/tests/test_trajectories.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openconcept/mission/tests/test_trajectories.py b/openconcept/mission/tests/test_trajectories.py index e12c5163..3c4d31dd 100644 --- a/openconcept/mission/tests/test_trajectories.py +++ b/openconcept/mission/tests/test_trajectories.py @@ -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) @@ -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() @@ -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"])