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

1from e31_pig_latin_file import plword, plfile 

2import pytest 

3 

4 

5@pytest.mark.parametrize('word, pword', [ 

6 ('test', 'esttay'), 

7 ('octopus', 'octopusway'), 

8 ('papaya', 'apayapay') 

9]) 

10def test_plword(word, pword): 

11 assert plword(word) == pword 

12 

13 

14@pytest.fixture 

15def simple_file(tmp_path): 

16 f = tmp_path / 'filename.txt' 

17 f.write_text('this is a test\nof my translation program\n') 

18 return f 

19 

20 

21def test_simple(simple_file): 

22 assert(plfile(simple_file) 

23 ) == 'histay isway away esttay ofway ymay ranslationtay rogrampay'