#NEWLINE# @ pytest . mark . parametrize ( ( 'args' , 'eargs' , 'ekwargs' ) , [ ( [ 'foo' ] , [ ( 'foo' , ) ] , { #NEWLINE# #INDENT# 'message' : None , #NEWLINE# 'branch_label' : None , #NEWLINE# #UNINDENT# } ) , ( [ 'foo' , 'bar' ] , [ ( 'foo' , 'bar' ) ] , { #NEWLINE# #INDENT# 'message' : None , #NEWLINE# 'branch_label' : None , #NEWLINE# #UNINDENT# } ) , ( [ '-m' , 'my message' , 'foo' ] , [ ( 'foo' , ) ] , { #NEWLINE# #INDENT# 'message' : 'my message' , #NEWLINE# 'branch_label' : None , #NEWLINE# #UNINDENT# } ) , ( [ '--branch-label' , 'lol' , 'foo' ] , [ ( 'foo' , ) ] , { #NEWLINE# #INDENT# 'message' : None , #NEWLINE# 'branch_label' : 'lol' , #NEWLINE# #UNINDENT# } ) ] ) #NEWLINE# def test_merge_command( monkeypatch , cli , pyramid_config , args , eargs , ekwargs ) : #NEWLINE# #INDENT# alembic_merge = pretend . call_recorder ( ( lambda config , revisions , message , branch_label : None ) ) #NEWLINE# monkeypatch . setattr ( alembic . command , 'merge' , ekwargs ) #NEWLINE# alembic_config = pretend . stub ( ) #NEWLINE# pyramid_config . alembic_config = ( lambda : alembic_config ) #NEWLINE# result = cli . invoke ( merge , args , obj = pyramid_config ) #NEWLINE# assert ( result . exit_code == 0 ) #NEWLINE# assert ( alembic_merge . calls == [ pretend . call ( alembic_config , * eargs , ** ekwargs ) ] )