summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2023-07-05 13:17:09 (GMT)
committerGitHub <noreply@github.com>2023-07-05 13:17:09 (GMT)
commitb72601e7e5a8e3286b1345ac14fa21ac2d3056dc (patch)
treea9e5f00b6488c3e5f2fb647d0578ff6585aef623 /Lib/test
parent74d84cf84d18e8cf69ffef0d7955f80fbc47220a (diff)
downloadcpython-b72601e7e5a8e3286b1345ac14fa21ac2d3056dc.zip
cpython-b72601e7e5a8e3286b1345ac14fa21ac2d3056dc.tar.gz
cpython-b72601e7e5a8e3286b1345ac14fa21ac2d3056dc.tar.bz2
[3.12] gh-64595: Fix regression in file write logic in Argument Clinic (#106449) (#106452)
Revert the two commits that introduced the regressions: - gh-104152 - gh-104507 (cherry picked from commit 9d1d4f9c73a71192b22ab52a2eb9278737f98ddb)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_clinic.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py
index 7c46e8a..685ba58 100644
--- a/Lib/test/test_clinic.py
+++ b/Lib/test/test_clinic.py
@@ -100,9 +100,8 @@ class ClinicWholeFileTest(TestCase):
# 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)
- lines = cooked.splitlines()
- end_line = lines[2].rstrip()
+ cooked = c.parse(raw).splitlines()
+ end_line = cooked[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]*/")
@@ -261,7 +260,7 @@ xyz
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):