def test_scientific_notation():
 loaded = load('a: {a: 1e3, b: 1.E4, c: -1e-3, d: 2.3e+4, e: .2e4, f: 23.53e1, g: 32284.2e+9, h: 2.333993939e-3}')
 assert isinstance(loaded['a']['a'], float)
 assert isinstance(loaded['a']['b'], float)
 assert isinstance(loaded['a']['c'], float)
 assert isinstance(loaded['a']['d'], float)
 assert isinstance(loaded['a']['e'], float)
 assert isinstance(loaded['a']['f'], float)
 assert isinstance(loaded['a']['g'], float)
 assert isinstance(loaded['a']['h'], float)

def test_scientific_notation ( ) : loaded = load ( 'a: {a: 1e3, b: 1.E4, c: -1e-3, d: 2.3e+4, e: .2e4, f: 23.53e1, g: 32284.2e+9, h: 2.333993939e-3}' ) assert isinstance ( loaded [ 'a' ] [ 'a' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'b' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'c' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'd' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'e' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'f' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'g' ] , float ) assert isinstance ( loaded [ 'a' ] [ 'h' ] , float )
test if yaml parses scientific notation as floats .