mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Merged revisions 78410 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r78410 | benjamin.peterson | 2010-02-23 20:28:05 -0600 (Tue, 23 Feb 2010) | 16 lines
Merged revisions 78408 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r78408 | benjamin.peterson | 2010-02-23 20:24:35 -0600 (Tue, 23 Feb 2010) | 9 lines
Merged revisions 78407 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r78407 | benjamin.peterson | 2010-02-23 20:21:34 -0600 (Tue, 23 Feb 2010) | 1 line
rewrite test to not rely on __doc__ being present
........
................
................
This commit is contained in:
parent
12b1e8ed39
commit
b61a04d72a
1 changed files with 12 additions and 14 deletions
|
|
@ -242,21 +242,19 @@ from __future__ import print_function"""
|
||||||
def test_refactor_docstring(self):
|
def test_refactor_docstring(self):
|
||||||
rt = self.rt()
|
rt = self.rt()
|
||||||
|
|
||||||
def example():
|
doc = """
|
||||||
"""
|
>>> example()
|
||||||
>>> example()
|
42
|
||||||
42
|
"""
|
||||||
"""
|
out = rt.refactor_docstring(doc, "<test>")
|
||||||
out = rt.refactor_docstring(example.__doc__, "<test>")
|
self.assertEqual(out, doc)
|
||||||
self.assertEqual(out, example.__doc__)
|
|
||||||
|
|
||||||
def parrot():
|
doc = """
|
||||||
"""
|
>>> def parrot():
|
||||||
>>> def parrot():
|
... return 43
|
||||||
... return 43
|
"""
|
||||||
"""
|
out = rt.refactor_docstring(doc, "<test>")
|
||||||
out = rt.refactor_docstring(parrot.__doc__, "<test>")
|
self.assertNotEqual(out, doc)
|
||||||
self.assertNotEqual(out, parrot.__doc__)
|
|
||||||
|
|
||||||
def test_explicit(self):
|
def test_explicit(self):
|
||||||
from myfixes.fix_explicit import FixExplicit
|
from myfixes.fix_explicit import FixExplicit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue