def test_permutations_exact(self): """permutations_exact should return expected results""" self.assertFloatEqual(permutations_exact(1, 1), 1) self.assertFloatEqual(permutations_exact(2, 1), 2) self.assertFloatEqual(permutations_exact(3, 1), 3) self.assertFloatEqual(permutations_exact(4, 1), 4) self.assertFloatEqual(permutations_exact(4, 2), 12) self.assertFloatEqual(permutations_exact(4, 3), 24) self.assertFloatEqual(permutations_exact(4, 4), 24) self.assertFloatEqual(permutations_exact(300, 100), 3.8807387193009318e239)
def test_permutations_exact(self): """permutations_exact should return expected results""" assert_allclose(permutations_exact(1, 1), 1) assert_allclose(permutations_exact(2, 1), 2) assert_allclose(permutations_exact(3, 1), 3) assert_allclose(permutations_exact(4, 1), 4) assert_allclose(permutations_exact(4, 2), 12) assert_allclose(permutations_exact(4, 3), 24) assert_allclose(permutations_exact(4, 4), 24) assert_allclose(permutations_exact(300, 100) / 3.8807387193009318e239, 1.0)