localization - How to handle multilingual data in lettuce? -


i wrote *.feature file , step.py lettuce work correctly, when put persian data *.feature file, stops working.

this feature file:

feature: computefactorial in order play lettuce beginners we'll implement factorial  scenario: factorial of 0     given have number 0     when compute factorial     see number علی 

and step.py:

from lettuce import *  @step('i have number (\d+)') def have_the_number(step, number):     world.number = int(number)  @step('i compute factorial') def compute_its_factorial(step):     world.number = factorial(world.number)  @step('i see number (\w+)') def check_number(step, expected):     #expected = int(expected)     assert true  def factorial(number):     return -1 

how can this?

if want use string need quotation marks. feature file should this.

scenario: factorial of 0     given have number 0     when compute factorial     see number "علی" 

and in step file:

... @step('i see number "(\w+)"') def check_number(step, expected):     #expected = int(expected)     assert true ... 

hope helps. step definition using string on main page of documentation


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -