def test_ensure_list():
 schema = vol.Schema(cv.ensure_list)
 assert ([] == schema(None))
 assert ([1] == schema(1))
 assert ([1] == schema([1]))
 assert (['1'] == schema('1'))
 assert (['1'] == schema(['1']))
 assert ([{'1': '2'}] == schema({'1': '2'}))

def test_ensure_list ( ) : schema = vol . Schema ( cv . ensure_list ) assert ( [ ] == schema ( None ) ) assert ( [ 1 ] == schema ( 1 ) ) assert ( [ 1 ] == schema ( [ 1 ] ) ) assert ( [ '1' ] == schema ( '1' ) ) assert ( [ '1' ] == schema ( [ '1' ] ) ) assert ( [ { '1' : '2' } ] == schema ( { '1' : '2' } ) )
test ensure_list .