Guest User

Untitled

a guest
Jan 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. from lettuce import *
  4. from k_adic import k_adic
  5.  
  6. @step('I have the number ([\d\*\+\ ]+)')
  7. def have_the_number(step, number):
  8. world.number = int(eval(number))
  9.  
  10. @step('I represent its k-adic notation')
  11. def represent_k_adic_notation(step):
  12. world.notation = k_adic(world.number)
  13.  
  14. @step('I see the notation ([A-Z]*)')
  15. def check_notation(step, expected):
  16. assert world.notation == expected, \
  17. "Got %s" % world.notation
Add Comment
Please, Sign In to add comment