@with_config(DEBUG=True, ASSETS_DEBUG=True)
def test_debug_inheritance():
 sub2 = Bundle('s4', filters=[js], output='bar')
 sub1 = Bundle('s3', sub2, debug='merge', output='foo', filters=[css])
 b = Bundle('s1', 's2', sub1, filters=[js])
 jl = bundle_to_joblist(b)
 assert (len(jl) == 3)
 assert (('s1' in jl) and ('s2' in jl))
 assert (jl['foo'][0][0] == [])
 assert (jl['foo'][1][0] == [])
 sub2.debug = True
 jl = bundle_to_joblist(b)
 assert (len(jl) == 4)
 assert (('s1' in jl) and ('s2' in jl) and ('s4' in jl))
 assert (jl['foo'][0][0] == [])

@ with_config ( DEBUG = True , ASSETS_DEBUG = True ) def test_debug_inheritance ( ) : sub2 = Bundle ( 's4' , filters = [ js ] , output = 'bar' ) sub1 = Bundle ( 's3' , sub2 , debug = 'merge' , output = 'foo' , filters = [ css ] ) b = Bundle ( 's1' , 's2' , sub1 , filters = [ js ] ) jl = bundle_to_joblist ( b ) assert ( len ( jl ) == 3 ) assert ( ( 's1' in jl ) and ( 's2' in jl ) ) assert ( jl [ 'foo' ] [ 0 ] [ 0 ] == [ ] ) assert ( jl [ 'foo' ] [ 1 ] [ 0 ] == [ ] ) sub2 . debug = True jl = bundle_to_joblist ( b ) assert ( len ( jl ) == 4 ) assert ( ( 's1' in jl ) and ( 's2' in jl ) and ( 's4' in jl ) ) assert ( jl [ 'foo' ] [ 0 ] [ 0 ] == [ ] )
test the bundle debug setting in a nested scenario .