def test_reciprocal_cycles_six(): """1/7 has longest under 8: 6-digit-long repeat, 0.(142857).""" assert reciprocal_cycles(8) == 7
def test_reciprocal_cycles_one(): """1/3 has longest under 4: 1-digit-long repeat, 0.(3).""" assert reciprocal_cycles(4) == 3
def test_exception_for_non_integer(): """Non-integers are not allowed as input.""" reciprocal_cycles(155.2223)
def test_reciprocal_cycles_none(): """Confirm that if no patterns exist, we get None.""" assert reciprocal_cycles(3) == None
def test_exception_for_less_than_1(): """Numbers less than 1 are not allowed as input.""" reciprocal_cycles(0)