Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # encoding: utf-8
- from lettuce import *
- from k_adic import k_adic
- @step('I have the number ([\d\*\+\ ]+)')
- def have_the_number(step, number):
- world.number = int(eval(number))
- @step('I represent its k-adic notation')
- def represent_k_adic_notation(step):
- world.notation = k_adic(world.number)
- @step('I see the notation ([A-Z]*)')
- def check_notation(step, expected):
- assert world.notation == expected, \
- "Got %s" % world.notation
Add Comment
Please, Sign In to add comment