MCPcopy Index your code
hub / github.com/geekcomputers/Python / test_reads_single_file

Method test_reads_single_file

Cat/test_cat.py:21–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 )
20
21 def test_reads_single_file(self):
22 with tempfile.TemporaryDirectory() as temp_dir:
23 file_path = Path(temp_dir) / "one.txt"
24 file_path.write_text("Alpha\nBeta\n", encoding="utf-8")
25
26 result = self.run_cat(file_path)
27
28 self.assertEqual(result.returncode, 0)
29 self.assertEqual(result.stdout, "Alpha\nBeta\n")
30 self.assertEqual(result.stderr, "")
31
32 def test_reads_multiple_files_in_order(self):
33 with tempfile.TemporaryDirectory() as temp_dir:

Callers

nothing calls this directly

Calls 1

run_catMethod · 0.95

Tested by

no test coverage detected