@with_config(DEBUG=True, ASSETS_DEBUG=True)
def test_unmergable():
 b = Bundle('s1', 's2', Bundle('s3', debug=False, filters=css, output='bar'), output='foo', filters=js)
 jl = bundle_to_joblist(b)
 assert (len(jl) == 3)
 assert (('s1' in jl) and ('s2' in jl))
 assert (jl['bar'][0][0] == [css])
 assert ('s3' in jl['bar'][0][1])
 assert_raises(BundleError, bundle_to_joblist, Bundle('s1', Bundle('s2', debug=False), output='foo'))

@ with_config ( DEBUG = True , ASSETS_DEBUG = True ) def test_unmergable ( ) : b = Bundle ( 's1' , 's2' , Bundle ( 's3' , debug = False , filters = css , output = 'bar' ) , output = 'foo' , filters = js ) jl = bundle_to_joblist ( b ) assert ( len ( jl ) == 3 ) assert ( ( 's1' in jl ) and ( 's2' in jl ) ) assert ( jl [ 'bar' ] [ 0 ] [ 0 ] == [ css ] ) assert ( 's3' in jl [ 'bar' ] [ 0 ] [ 1 ] ) assert_raises ( BundleError , bundle_to_joblist , Bundle ( 's1' , Bundle ( 's2' , debug = False ) , output = 'foo' ) )
a subbundle that is unmergable will be pulled into a separate job .