Example #1
0
    def test_at(self):
        # Usually an object is created. You can also set it up using setUp() method.
        obj = Fib()

        self.assertEqual(8, obj.at(6))
        self.assertEqual(1, obj.at(1))
        self.assertEqual(1, obj.at(2))
Example #2
0
def test_fib_class():
    obj = Fib()

    assert obj.at(1) == 1
    assert obj.at(2) == 1
    assert list(obj.get_all(2)) == [1, 1]
    assert list(obj.get_all(6)) == [1, 1, 2, 3, 5, 8]