Fix autodoc: autodoc_member_order_does not refer order of imports (refs: #6574)

This commit is contained in:
Takeshi KOMIYA
2019-07-13 22:02:49 +09:00
parent 0bc530f1b7
commit 8c924f1b3d
3 changed files with 34 additions and 0 deletions

View File

@@ -344,6 +344,22 @@ def test_async_function_and_method():
'Foo.method': ('def', 6, 7)}
def test_imports():
source = ('import sys\n'
'from os import environment, path\n'
'\n'
'import sphinx as Sphinx\n'
'from sphinx.application import Sphinx as App\n')
parser = Parser(source)
parser.parse()
assert parser.definitions == {}
assert parser.deforders == {'sys': 0,
'environment': 1,
'path': 2,
'Sphinx': 3,
'App': 4}
def test_formfeed_char():
source = ('class Foo:\n'
'\f\n'