#NEWLINE# def test_testing_floats( module_name = 'this module' ) : #NEWLINE# #INDENT# number1 = 1.25 #NEWLINE# number2 = 1 #NEWLINE# number3 = ( - 1 ) #NEWLINE# number4 = ( 5 / 4 ) #NEWLINE# number6 = 6 #NEWLINE# assert ( rounding_floats ( module_name , number2 ) == 1.2 ) #NEWLINE# assert ( rounding_floats ( ( number1 * 10 ) , number3 ) == 10 ) #NEWLINE# assert ( float_to_fractions ( number1 ) == number4 ) #NEWLINE# assert ( get_denominator ( number2 , number6 ) == number6 ) #NEWLINE# assert ( get_numerator ( number2 , number6 ) == number2 ) #NEWLINE# s = 'Tests in {name} have {con}!' #NEWLINE# print ( s . format ( name = module_name , con = 'passed' ) )