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

Method test_squeeze_repeated_blank_lines

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

Source from the content-addressed store, hash-verified

108 self.assertEqual(result.stdout, expected)
109
110 def test_squeeze_repeated_blank_lines(self):
111 with tempfile.TemporaryDirectory() as temp_dir:
112 file_path = Path(temp_dir) / "blanks.txt"
113 file_path.write_text("Alpha\n\n\nBeta\n\n\n", encoding="utf-8")
114
115 result = self.run_cat("-s", file_path)
116
117 self.assertEqual(result.returncode, 0)
118 self.assertEqual(result.stdout, "Alpha\n\nBeta\n\n")
119
120 def test_show_ends(self):
121 with tempfile.TemporaryDirectory() as temp_dir:

Callers

nothing calls this directly

Calls 1

run_catMethod · 0.95

Tested by

no test coverage detected