MCPcopy
hub / github.com/pytest-dev/pytest / read_binary

Method read_binary

src/_pytest/_py/path.py:362–365  ·  view source on GitHub ↗

Read and return a bytestring from reading the path.

(self)

Source from the content-addressed store, hash-verified

360 return self._getbyspec("ext")[0]
361
362 def read_binary(self):
363 """Read and return a bytestring from reading the path."""
364 with self.open("rb") as f:
365 return f.read()
366
367 def read_text(self, encoding):
368 """Read and return a Unicode string from reading the path."""

Callers 3

test_atimeMethod · 0.80
test_read_binwriteMethod · 0.80
test_read_textwriteMethod · 0.80

Calls 2

openMethod · 0.95
readMethod · 0.45

Tested by 3

test_atimeMethod · 0.64
test_read_binwriteMethod · 0.64
test_read_textwriteMethod · 0.64