Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adapt tests to new parse() behaviour
  • Loading branch information
erlend-aasland committed May 4, 2023
commit 34a577023f1c9455c6a37c1f3d0fdc6d37413edf
7 changes: 4 additions & 3 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ def test_eol(self):
# the last line of the block got corrupted.
c = clinic.Clinic(clinic.CLanguage(None), filename="file")
raw = "/*[clinic]\nfoo\n[clinic]*/"
cooked = c.parse(raw).splitlines()
end_line = cooked[2].rstrip()
cooked, _ = c.parse(raw)
lines = cooked.splitlines()
end_line = lines[2].rstrip()
# this test is redundant, it's just here explicitly to catch
# the regression test so we don't forget what it looked like
self.assertNotEqual(end_line, "[clinic]*/[clinic]*/")
Expand Down Expand Up @@ -259,7 +260,7 @@ def _test_clinic(self, input, output):
c = clinic.Clinic(language, filename="file")
c.parsers['inert'] = InertParser(c)
c.parsers['copy'] = CopyParser(c)
computed = c.parse(input)
computed, _ = c.parse(input)
self.assertEqual(output, computed)

def test_clinic_1(self):
Expand Down