MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_writes_and_seeks

Method test_writes_and_seeks

Lib/test/test_io.py:1953–1965  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1951 self.check_writes(lambda bufio: bufio.flush())
1952
1953 def test_writes_and_seeks(self):
1954 def _seekabs(bufio):
1955 pos = bufio.tell()
1956 bufio.seek(pos + 1, 0)
1957 bufio.seek(pos - 1, 0)
1958 bufio.seek(pos, 0)
1959 self.check_writes(_seekabs)
1960 def _seekrel(bufio):
1961 pos = bufio.seek(0, 1)
1962 bufio.seek(+1, 1)
1963 bufio.seek(-1, 1)
1964 bufio.seek(pos, 0)
1965 self.check_writes(_seekrel)
1966
1967 def test_writes_and_truncates(self):
1968 self.check_writes(lambda bufio: bufio.truncate(bufio.tell()))

Callers

nothing calls this directly

Calls 1

check_writesMethod · 0.95

Tested by

no test coverage detected