Skip to content

Commit 8e97d08

Browse files
Add comment about happy paths in doctests
1 parent 54cf4bf commit 8e97d08

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_difflib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,8 @@ def test_longest_match_with_popular_chars(self):
632632

633633

634634
class TestCloseMatches(unittest.TestCase):
635+
# Happy paths are tested in the doctests of `difflib.get_close_matches`.
636+
635637
def test_invalid_inputs(self):
636638
self.assertRaises(ValueError, difflib.get_close_matches, "spam", ['egg'], n=0)
637639
self.assertRaises(ValueError, difflib.get_close_matches, "spam", ['egg'], n=-1)
@@ -640,6 +642,8 @@ def test_invalid_inputs(self):
640642

641643

642644
class TestRestore(unittest.TestCase):
645+
# Happy paths are tested in the doctests of `difflib.restore`.
646+
643647
def test_invalid_input(self):
644648
with self.assertRaises(ValueError):
645649
''.join(difflib.restore([], 0))

0 commit comments

Comments
 (0)