def setUp(self): self.yaw = YawSystem() self.yaw.rotor_diameter = 126. # rotor diameter [m] self.yaw.rotor_thrust = 2.5448e5 self.yaw.tower_top_diameter = 3.78 # tower top diameter [m] self.yaw.above_yaw_mass = 259430.9
class Test_YawSystem(unittest.TestCase): def setUp(self): self.yaw = YawSystem() self.yaw.rotor_diameter = 126. # rotor diameter [m] self.yaw.rotor_thrust = 2.5448e5 self.yaw.tower_top_diameter = 3.78 # tower top diameter [m] self.yaw.above_yaw_mass = 259430.9 def test_functionality(self): self.yaw.run() self.assertEqual(round(self.yaw.mass, 1), 13789.0) def test_gradient(self): check_gradient_unit_test(self, self.yaw, display=False)
class Test_YawSystem(unittest.TestCase): def setUp(self): self.yaw = YawSystem() self.yaw.rotor_diameter = 126. # rotor diameter [m] self.yaw.rotor_thrust = 2.5448e5 self.yaw.tower_top_diameter = 3.78 # tower top diameter [m] self.yaw.above_yaw_mass = 259430.9 def test_functionality(self): self.yaw.run() self.assertEqual(round(self.yaw.mass,1), 13789.0) def test_gradient(self): check_gradient_unit_test(self, self.yaw, display=False)