Esempio n. 1
0
 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)
Esempio n. 2
0
 def testFirstStageCatastrophicFailure(self):
     fs = models.FirstStage()
     with self.assertRaises(models.CatastrophicFailure) as context:
         fs.burn(1.0, 200)
Esempio n. 3
0
 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]
Esempio n. 4
0
 def testInterStageInitialization(self):
     fs = models.FirstStage()
     ss = models.SecondStage()
     istage = models.InterStage(fs, ss)
     self.assertIsInstance(istage, models.InterStage)
Esempio n. 5
0
 def testFirstStageInitialization(self):
     fs = models.FirstStage()
     self.assertIsInstance(fs, models.FirstStage)
     self.assertEqual(len(fs.engines), 9)