Beispiel #1
0
 def test_sphinx_py_method_with_params(self):
     style = ReSTStyle(ReSTDocument())
     style.start_sphinx_py_method('method', 'foo=None')
     style.end_sphinx_py_method()
     self.assertEqual(style.doc.getvalue(),
                      b'\n\n.. py:method:: method(foo=None)\n\n  \n\n')
Beispiel #2
0
 def test_sphinx_py_method(self):
     style = ReSTStyle(ReSTDocument())
     style.start_sphinx_py_method('method')
     style.end_sphinx_py_method()
     self.assertEqual(style.doc.getvalue(),
                      b'\n\n.. py:method:: method\n\n  \n\n')