Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1import pytest 

2from e26_calc import calc 

3 

4 

5@pytest.mark.parametrize('to_solve, output', [ 

6 ('+ 2 2', 4), 

7 ('- 2 3', -1), 

8 ('* 2 4', 8), 

9 ('/ 5 2', 2.5), 

10 ('** 2 6', 64), 

11 ('% 7 2', 1), 

12]) 

13def test_simple(to_solve, output): 

14 assert calc(to_solve) == output