def test_smallest_factor(): assert soln.smallest_factor(4) == 2, 'Range is too small' assert soln.smallest_factor(6) == 2, 'Range is too small' assert soln.smallest_factor(8) == 2, 'Range is too small' assert soln.smallest_factor(1) == 1, 'One fails' assert soln.smallest_factor(5) == 5, 'Primes fail'
def test_smallest_factor(): assert soln.smallest_factor(10) == 2, "Incorrect!" assert soln.smallest_factor(3) == 3, "Incorrect!" assert soln.smallest_factor(1) == 1, "Incorrect!"
def test_smallest_factor(): assert soln.smallest_factor(10) == 2, "inc" assert soln.smallest_factor(3) == 3, "inc"
def test_smallest_factor(): assert soln.smallest_factor(2) == 2 assert soln.smallest_factor(121) == 11 assert soln.smallest_factor(1) == 1
def test_smallest_factor(): assert soln.smallest_factor(1) == 1, "Failed for 1" assert soln.smallest_factor(2) == 2, "Failed for 2" assert soln.smallest_factor(6) == 2, "Failed for composite number" assert soln.smallest_factor(7) == 7, "Failed for prime number" assert soln.smallest_factor(9) == 3, "Failed for squared number"
def test_smallest_factor(): assert soln.smallest_factor(1) == 1, "when n = 1" assert soln.smallest_factor(2) == 2, "when n = 2" assert soln.smallest_factor(3) == 3, "when n = 3" assert soln.smallest_factor(4) == 2, "when n = 4" assert soln.smallest_factor(6) == 2, "when n = 6"