Tests that the read method increments the cursor position and the seek method moves the cursor to the appropriate position
()
| 41 | |
| 42 | |
| 43 | def test_04(): |
| 44 | """ |
| 45 | Tests that the read method increments the |
| 46 | cursor position and the seek method moves |
| 47 | the cursor to the appropriate position |
| 48 | """ |
| 49 | string = "Test String 4" |
| 50 | f = StringIO(string) |
| 51 | |
| 52 | assert f.read(4) == "Test" |
| 53 | assert f.tell() == 4 |
| 54 | assert f.seek(0) == 0 |
| 55 | assert f.read(4) == "Test" |
| 56 | |
| 57 | |
| 58 | def test_05(): |
no test coverage detected