def test_mode_digit(): """ Test the function mode_digit """ print('Testing mode_digit') assert_equals(1, hw1.mode_digit(12121)) assert_equals(0, hw1.mode_digit(0)) assert_equals(2, hw1.mode_digit(-122)) assert_equals(2, hw1.mode_digit(1211232231)) assert_equals(8, hw1.mode_digit(12345678)) assert_equals(9, hw1.mode_digit(-99943338))
def test_mode_digit(): """ Tests the function count_divisible_digits """ print('test_mode_digit') assert_equals(1, hw1.mode_digit(12121)) assert_equals(0, hw1.mode_digit(0)) assert_equals(2, hw1.mode_digit(-122)) assert_equals(2, hw1.mode_digit(1211232231)) assert_equals(3, hw1.mode_digit(-2893748237958279323414)) assert_equals(9, hw1.mode_digit(9911223344))
def test_mode_digit(): """ Tests the function mode_digit """ print('Testing mode_digit') # Spec tests assert_equals(1, hw1.mode_digit(12121)) assert_equals(0, hw1.mode_digit(0)) assert_equals(2, hw1.mode_digit(-122)) assert_equals(2, hw1.mode_digit(1211232231)) # Edge cases assert_equals(4, hw1.mode_digit(444222)) assert_equals(9, hw1.mode_digit(8675309))
def test_mode_digit(): """ Tests the mode_digit """ print('Testing mode_digit') # Notice that we have to start the function calls with "hw1." since # they live in another file # Cases from the made up "spec" for this problem assert_equals(1, hw1.mode_digit(12121)) assert_equals(0, hw1.mode_digit(0)) assert_equals(2, hw1.mode_digit(-122)) assert_equals(2, hw1.mode_digit(1211232231)) # Additional two cases assert_equals(6, hw1.mode_digit(-166666666)) assert_equals(9, hw1.mode_digit(13339999555222))
def test_mode_digit(): assert_equals(1, hw1.mode_digit(12121)) # new tests assert_equals(3, hw1.mode_digit(2233)) assert_equals(1, hw1.mode_digit(1)) assert_equals(1, hw1.mode_digit(-1))