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 e18_final_line import get_final_line 

2import pytest 

3 

4 

5@pytest.fixture 

6def empty_file(tmp_path): 

7 f = tmp_path / 'filename.txt' 

8 f.write_text('') 

9 return f 

10 

11 

12@pytest.fixture 

13def simple_file(tmp_path): 

14 f = tmp_path / 'filename.txt' 

15 f.write_text('abcd\nefgh\nijkl\n') 

16 return f 

17 

18 

19def test_empty(empty_file): 

20 assert get_final_line(empty_file) == '' 

21 

22 

23def test_simple(simple_file): 

24 assert get_final_line(simple_file) == 'ijkl\n'