def test_empty_offshore_section(self): offshore = S('Offshore') pitch = P('Pitch', self.null) roll = P('Roll', self.null) phase = OnDeck() phase.derive(self.gnds, pitch, roll, offshore) self.assertEqual(phase.get_first(), None)
def test_basic(self): pitch = P('Pitch', self.wave * 2.0) roll = P('Roll', self.null) phase = OnDeck() phase.derive(self.gnds, pitch, roll) self.assertEqual(phase.name, 'On Deck') self.assertEqual(phase.get_first().slice, slice(10, 90))
def test_offshore_section(self): offshore = buildsection('Offshore', 5, 100) pitch = P('Pitch', self.null) roll = P('Roll', self.null) phase = OnDeck() phase.derive(self.gnds, pitch, roll, offshore) self.assertEqual(phase.get_first().slice, slice(10, 90))
def test_basic(self): pitch = P('Pitch', self.wave * 2.0) roll = P('Roll', self.null) phase = OnDeck() phase.derive(self.gnds, pitch, roll) self.assertEqual(phase.name,'On Deck') self.assertEqual(phase.get_first().slice, slice(10, 90))
def test_still_on_ground(self): pitch = P('Pitch', self.null) roll = P('Roll', self.null) phase = OnDeck() phase.derive(self.gnds, pitch, roll) self.assertEqual(phase.get_first(), None)
def test_roll_and_pitch(self): pitch = P('Pitch', self.wave) roll = P('Roll', self.wave) phase = OnDeck() phase.derive(self.gnds, pitch, roll) self.assertEqual(phase.get_first().slice, slice(10, 90))
def test_roll(self): pitch = P('Pitch', self.null) roll = P('Roll', self.wave * 2.0) phase = OnDeck() phase.derive(self.gnds, pitch, roll, None) self.assertEqual(phase.get_first().slice, slice(10, 90))
def test_still_on_ground(self): pitch = P('Pitch', self.null) roll = P('Roll', self.null) phase = OnDeck() phase.derive(self.gnds, pitch, roll) self.assertEqual(phase.get_first(), None)
def test_roll_and_pitch(self): pitch = P('Pitch', self.wave) roll = P('Roll', self.wave) phase = OnDeck() phase.derive(self.gnds, pitch, roll) self.assertEqual(phase.get_first().slice, slice(10, 90))