예제 #1
0
    def test_line1(self):
        line1 = "Vixen can fly 8 km/s for 8 seconds, but then must rest for 53 seconds."
        output = values_from_line(line1)

        self.assertEqual(("Vixen", 8, 8, 53), output)
예제 #2
0
    def test_dist_from_seconds2(self):
        line1 = "Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds."
        output = values_from_line(line1)

        self.assertEqual(distance_from_seconds(output, 1000), 1120)
예제 #3
0
    def test_line3(self):
        line1 = 'Bob would gain 83 happiness units by sitting next to Alice.'
        output = values_from_line(line1)

        self.assertEqual(('Bob', 'Alice', 83), output)
예제 #4
0
    def test_line1(self):
        line1 = 'Carol would lose 62 happiness units by sitting next to Alice.'
        output = values_from_line(line1)

        self.assertEqual(('Carol', 'Alice', -62), output)
예제 #5
0
    def test_line2(self):
        line1 = 'David would lose 7 happiness units by sitting next to Bob.'
        output = values_from_line(line1)

        self.assertEqual(('David', 'Bob', -7), output)