@when(u'we start external editor providing a file name')
def step_edit_file(context):
 context.editor_file_name = u'test_file_{0}.sql'.format(context.conf[u'vi'])
 if os.path.exists(context.editor_file_name):
  os.remove(context.editor_file_name)
 context.cli.sendline(u'\\e {0}'.format(context.editor_file_name))
 _expect_exact(context, u'nano', timeout=2)

@ when ( u'we start external editor providing a file name' ) def step_edit_file ( context ) : context . editor_file_name = u'test_file_{0}.sql' . format ( context . conf [ u'vi' ] ) if os . path . exists ( context . editor_file_name ) : os . remove ( context . editor_file_name ) context . cli . sendline ( u'\\e {0}' . format ( context . editor_file_name ) ) _expect_exact ( context , u'nano' , timeout = 2 )
edit file with external editor .