def test_seek_whence_one(self): r = Reader('') r._pos = 2 r.seek(5, 1) assert_equals(7, r._pos)
def test_seek_whence_two(self): r = Reader('foo bar') r.seek(-3, 2) assert_equals(3, r._pos)
def test_seek_whence_zero(self): r = Reader('', 3) assert_equals(3, r._pos) r.seek(5) assert_equals(8, r._pos)