I wrote a *.feature file and step.py with lettuce that work correctly, but when I put Persian data into *.feature file, it stops working.
This is my feature file:
Feature: Computefactorial
In order to play with Lettuce
As beginners
We'll implement factorial
Scenario: Factorial of 0
Given I have the number 0
When I compute its factorial
Then I see the number علی
and this is my step.py:
from lettuce import *
@step('I have the number (\d+)')
def have_the_number(step, number):
world.number = int(number)
@step('I compute its factorial')
def compute_its_factorial(step):
world.number = factorial(world.number)
@step('I see the number (\w+)')
def check_number(step, expected):
#expected = int(expected)
assert True
def factorial(number):
return -1
How can i do this?
thanks for answers. i solve this problem with using
@step('I see the number ([\s|\S]*)')
this work good and accept spaces.