diff options
author | Georg Brandl <georg@python.org> | 2009-09-07 22:52:26 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-09-07 22:52:26 +0200 |
commit | fa7f8812cd4e82e2393e8a8023312f71b5199d34 (patch) | |
tree | 89c33e03f3beba4ed7343248c34be120be6cf78d /tests/test_autodoc.py | |
parent | 0d029eeb9c6cb98236fa44fb182879fa9c1a7ad7 (diff) | |
download | sphinx-git-fa7f8812cd4e82e2393e8a8023312f71b5199d34.tar.gz |
More refactoring for language-independent domain support.
* Renamed "desc"ription unit to "object" wherever possible.
* Added standard x-ref types to a StandardDomain which is always consulted.
* Split domains module into a subpackage.
* Removed additional_xref_types in favor of new directive classes in StandardDomain.
* Implemented x-ref inventory version 2, for all object types.
* Added env.doc_read_data which is for temporary data stored while reading.
* Minimally updated extension tutorial.
* Started to implement changes to interactive search.
* Test suite passes again.
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index 8e0114386..0820e0d22 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -97,28 +97,28 @@ def test_parse_name(): verify('function', 'util.raises', ('util', ['raises'], None, None)) verify('function', 'util.raises(exc) -> None', ('util', ['raises'], 'exc', 'None')) - directive.env.autodoc_current_module = 'util' + directive.env.doc_read_data['autodoc_module'] = 'util' verify('function', 'raises', ('util', ['raises'], None, None)) - directive.env.autodoc_current_module = None - directive.env.currmodule = 'util' + del directive.env.doc_read_data['autodoc_module'] + directive.env.doc_read_data['py_module'] = 'util' verify('function', 'raises', ('util', ['raises'], None, None)) verify('class', 'TestApp', ('util', ['TestApp'], None, None)) # for members - directive.env.currmodule = 'foo' + directive.env.doc_read_data['py_module'] = 'foo' verify('method', 'util.TestApp.cleanup', ('util', ['TestApp', 'cleanup'], None, None)) - directive.env.currmodule = 'util' - directive.env.currclass = 'Foo' - directive.env.autodoc_current_class = 'TestApp' + directive.env.doc_read_data['py_module'] = 'util' + directive.env.doc_read_data['py_class'] = 'Foo' + directive.env.doc_read_data['autodoc_class'] = 'TestApp' verify('method', 'cleanup', ('util', ['TestApp', 'cleanup'], None, None)) verify('method', 'TestApp.cleanup', ('util', ['TestApp', 'cleanup'], None, None)) # and clean up - directive.env.currmodule = None - directive.env.currclass = None - directive.env.autodoc_current_class = None + del directive.env.doc_read_data['py_module'] + del directive.env.doc_read_data['py_class'] + del directive.env.doc_read_data['autodoc_class'] def test_format_signature(): @@ -353,7 +353,7 @@ def test_generate(): 'function', 'util.foobar', more_content=None) # test auto and given content mixing - directive.env.currmodule = 'test_autodoc' + directive.env.doc_read_data['py_module'] = 'test_autodoc' assert_result_contains(' Function.', 'method', 'Class.meth') add_content = ViewList() add_content.append('Content.', '', 0) @@ -428,7 +428,7 @@ def test_generate(): 'class', 'Outer', all_members=True) # test generation for C modules (which have no source file) - directive.env.currmodule = 'time' + directive.env.doc_read_data['py_module'] = 'time' assert_processes([('function', 'time.asctime')], 'function', 'asctime') assert_processes([('function', 'time.asctime')], 'function', 'asctime') |