def test_filter_merge():
 b = Bundle('s1', Bundle('s2', Bundle('s3', filters=[css, sass]), filters=[js]), output='foo')
 jl = bundle_to_joblist(b)
 assert (jl['foo'][0][0] == [])
 assert (jl['foo'][0][1] == ['s1'])
 assert (jl['foo'][1][0] == [js])
 assert (jl['foo'][1][1] == ['s2'])
 assert (jl['foo'][2][0] == [css, sass, js])
 assert (jl['foo'][2][1] == ['s3'])

def test_filter_merge ( ) : b = Bundle ( 's1' , Bundle ( 's2' , Bundle ( 's3' , filters = [ css , sass ] ) , filters = [ js ] ) , output = 'foo' ) jl = bundle_to_joblist ( b ) assert ( jl [ 'foo' ] [ 0 ] [ 0 ] == [ ] ) assert ( jl [ 'foo' ] [ 0 ] [ 1 ] == [ 's1' ] ) assert ( jl [ 'foo' ] [ 1 ] [ 0 ] == [ js ] ) assert ( jl [ 'foo' ] [ 1 ] [ 1 ] == [ 's2' ] ) assert ( jl [ 'foo' ] [ 2 ] [ 0 ] == [ css , sass , js ] ) assert ( jl [ 'foo' ] [ 2 ] [ 1 ] == [ 's3' ] )
test that filter lists in a nested bundle structure are properly merged .