Commits

Georg Brandl  committed 9f86e46

Fix test suite.

  • Participants
  • Parent commits 57a4791

Comments (0)

Files changed (2)

File tests/test_autodoc.py

     verify('function', 'util.raises', ('util', ['raises'], None, None))
     verify('function', 'util.raises(exc) -> None',
            ('util', ['raises'], 'exc', 'None'))
-    directive.env.doc_read_data['autodoc:module'] = 'util'
+    directive.env.temp_data['autodoc:module'] = 'util'
     verify('function', 'raises', ('util', ['raises'], None, None))
-    del directive.env.doc_read_data['autodoc:module']
-    directive.env.doc_read_data['py:module'] = 'util'
+    del directive.env.temp_data['autodoc:module']
+    directive.env.temp_data['py:module'] = 'util'
     verify('function', 'raises', ('util', ['raises'], None, None))
     verify('class', 'TestApp', ('util', ['TestApp'], None, None))
 
     # for members
-    directive.env.doc_read_data['py:module'] = 'foo'
+    directive.env.temp_data['py:module'] = 'foo'
     verify('method', 'util.TestApp.cleanup',
            ('util', ['TestApp', 'cleanup'], None, None))
-    directive.env.doc_read_data['py:module'] = 'util'
-    directive.env.doc_read_data['py:class'] = 'Foo'
-    directive.env.doc_read_data['autodoc:class'] = 'TestApp'
+    directive.env.temp_data['py:module'] = 'util'
+    directive.env.temp_data['py:class'] = 'Foo'
+    directive.env.temp_data['autodoc:class'] = 'TestApp'
     verify('method', 'cleanup', ('util', ['TestApp', 'cleanup'], None, None))
     verify('method', 'TestApp.cleanup',
            ('util', ['TestApp', 'cleanup'], None, None))
 
     # and clean up
-    del directive.env.doc_read_data['py:module']
-    del directive.env.doc_read_data['py:class']
-    del directive.env.doc_read_data['autodoc:class']
+    del directive.env.temp_data['py:module']
+    del directive.env.temp_data['py:class']
+    del directive.env.temp_data['autodoc:class']
 
 
 def test_format_signature():
                  'function', 'util.foobar', more_content=None)
 
     # test auto and given content mixing
-    directive.env.doc_read_data['py:module'] = 'test_autodoc'
+    directive.env.temp_data['py:module'] = 'test_autodoc'
     assert_result_contains('   Function.', 'method', 'Class.meth')
     add_content = ViewList()
     add_content.append('Content.', '', 0)
                            'attribute', 'test_autodoc.Class.descr')
 
     # test generation for C modules (which have no source file)
-    directive.env.doc_read_data['py:module'] = 'time'
+    directive.env.temp_data['py:module'] = 'time'
     assert_processes([('function', 'time.asctime')], 'function', 'asctime')
     assert_processes([('function', 'time.asctime')], 'function', 'asctime')
 

File tests/test_markup.py

     settings = optparser.get_default_values()
     settings.env = app.builder.env
     settings.env.patch_lookup_functions()
-    settings.env.doc_read_data['docname'] = 'dummy'
+    settings.env.temp_data['docname'] = 'dummy'
     parser = rst.Parser()
 
 def teardown_module():