MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / DedupeLinesTests

Class DedupeLinesTests

tests/preprocess/test_clean.py:66–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65
66class DedupeLinesTests(unittest.TestCase):
67 def test_empty_string_returns_empty(self):
68 self.assertEqual(dedupe_lines(""), "")
69
70 def test_consecutive_duplicates_removed(self):
71 text = "header\nheader\nbody"
72 self.assertEqual(dedupe_lines(text), "header\nbody")
73
74 def test_non_consecutive_duplicates_preserved(self):
75 text = "header\nbody\nheader"
76 self.assertEqual(dedupe_lines(text), "header\nbody\nheader")
77
78 def test_blank_lines_not_collapsed(self):
79 text = "\n\n\n"
80 self.assertEqual(dedupe_lines(text), "\n\n\n")
81
82 def test_whitespace_insensitive_dedupe(self):
83 text = "Page 3\n Page 3 \nbody"
84 self.assertEqual(dedupe_lines(text), "Page 3\nbody")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected