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

Method read_text

src/_pytest/_py/path.py:367–370  ·  src/_pytest/_py/path.py::LocalPath.read_text

Read and return a Unicode string from reading the path.

(self, encoding)

Source from the content-addressed store, hash-verified

365 return f.read()
366
367 def read_text(self, encoding):
368 class="st">""class="st">"Read and return a Unicode string from reading the path."class="st">""
369 with self.open(class="st">"r", encoding=encoding) as f:
370 return f.read()
371
372 def read(self, mode=class="st">"r"):
373 class="st">""class="st">"Read and return a bytestring from reading the path."class="st">""

Callers 15

mainFunction · 0.80
collectMethod · 0.80
announceFunction · 0.80
collectMethod · 0.80
test_gitignoreFunction · 0.80
test_debugFunction · 0.80
test_nullbyteFunction · 0.80
test_nullbyte_replaceFunction · 0.80

Calls 2

openMethod · 0.95
readMethod · 0.45

Tested by 15

collectMethod · 0.64
collectMethod · 0.64
test_gitignoreFunction · 0.64
test_debugFunction · 0.64
test_nullbyteFunction · 0.64
test_nullbyte_replaceFunction · 0.64
test_copy_fileMethod · 0.64
test_copy_dirMethod · 0.64
batch_make_numbered_dirsFunction · 0.64
test_open_and_ensureMethod · 0.64