def testInterStageDetatchFirstStage(self): fs = models.FirstStage() ss = models.SecondStage() istage = models.InterStage(fs, ss) self.assertIsInstance(istage.firstStage, models.FirstStage) istage.detatchFirstStage() self.assertIsNone(istage.firstStage)
def testFirstStageCatastrophicFailure(self): fs = models.FirstStage() with self.assertRaises(models.CatastrophicFailure) as context: fs.burn(1.0, 200)
def testFirstStageLaunch(self): fs = models.FirstStage() [self.assertEqual(e.fuelLevel, 1.0) for e in fs.engines] fs.launch() [self.assertLess(e.fuelLevel, 0.4) for e in fs.engines]
def testInterStageInitialization(self): fs = models.FirstStage() ss = models.SecondStage() istage = models.InterStage(fs, ss) self.assertIsInstance(istage, models.InterStage)
def testFirstStageInitialization(self): fs = models.FirstStage() self.assertIsInstance(fs, models.FirstStage) self.assertEqual(len(fs.engines), 9)