@with_config(DEBUG=True, ASSETS_DEBUG='merge')
def test_debug_merge_only():
 sub = Bundle('s3', filters=[css], output='bar')
 b = Bundle('s1', 's2', sub, output='foo', filters=[js])
 jl = bundle_to_joblist(b)
 assert (len(jl) == 1)
 assert (jl['foo'][0][0] == [])
 assert (jl['foo'][1][0] == [])
 sub.debug = False
 jl = bundle_to_joblist(b)
 assert (len(jl) == 1)
 assert (jl['foo'][0][0] == [])
 assert (jl['foo'][1][0] == [css])
 sub.debug = True
 jl = bundle_to_joblist(b)
 assert (len(jl) == 2)
 assert (jl['foo'][0][0] == [])

@ with_config ( DEBUG = True , ASSETS_DEBUG = 'merge' ) def test_debug_merge_only ( ) : sub = Bundle ( 's3' , filters = [ css ] , output = 'bar' ) b = Bundle ( 's1' , 's2' , sub , output = 'foo' , filters = [ js ] ) jl = bundle_to_joblist ( b ) assert ( len ( jl ) == 1 ) assert ( jl [ 'foo' ] [ 0 ] [ 0 ] == [ ] ) assert ( jl [ 'foo' ] [ 1 ] [ 0 ] == [ ] ) sub . debug = False jl = bundle_to_joblist ( b ) assert ( len ( jl ) == 1 ) assert ( jl [ 'foo' ] [ 0 ] [ 0 ] == [ ] ) assert ( jl [ 'foo' ] [ 1 ] [ 0 ] == [ css ] ) sub . debug = True jl = bundle_to_joblist ( b ) assert ( len ( jl ) == 2 ) assert ( jl [ 'foo' ] [ 0 ] [ 0 ] == [ ] )
test the merge only debug option .