def test_nested_prefix():
 cm1 = prefix('1')
 cm2 = prefix('2')
 with cm1:
  with cm2:
   eq_(env.command_prefixes, ['1', '2'])

def test_nested_prefix ( ) : cm1 = prefix ( '1' ) cm2 = prefix ( '2' ) with cm1 : with cm2 : eq_ ( env . command_prefixes , [ '1' , '2' ] )
prefix context managers can be created outside of the with block and nested .