mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Remove function based directives
This commit is contained in:
parent
acbf62fb6d
commit
a9f370bc12
@ -92,11 +92,6 @@ def userdesc_parse(env, sig, signode):
|
||||
return x
|
||||
|
||||
|
||||
def functional_directive(name, arguments, options, content, lineno,
|
||||
content_offset, block_text, state, state_machine):
|
||||
return [nodes.strong(text='from function: %s' % options['opt'])]
|
||||
|
||||
|
||||
class ClassDirective(Directive):
|
||||
option_spec = {'opt': lambda x: x}
|
||||
|
||||
@ -108,7 +103,6 @@ def setup(app):
|
||||
import parsermod
|
||||
|
||||
app.add_config_value('value_from_conf_py', 42, False)
|
||||
app.add_directive('funcdir', functional_directive, opt=lambda x: x)
|
||||
app.add_directive('clsdir', ClassDirective)
|
||||
app.add_object_type('userdesc', 'userdescrole', '%s (userdesc)',
|
||||
userdesc_parse, objname='user desc')
|
||||
|
@ -3,8 +3,5 @@ Extension API tests
|
||||
|
||||
Testing directives:
|
||||
|
||||
.. funcdir::
|
||||
:opt: Foo
|
||||
|
||||
.. clsdir::
|
||||
:opt: Bar
|
||||
|
@ -186,7 +186,6 @@ def test_html_warnings(app, warning):
|
||||
(".//dd/p", r'Return spam\.'),
|
||||
],
|
||||
'extapi.html': [
|
||||
(".//strong", 'from function: Foo'),
|
||||
(".//strong", 'from class: Bar'),
|
||||
],
|
||||
'markup.html': [
|
||||
|
@ -95,7 +95,6 @@ def cached_etree_parse():
|
||||
(".//dd/p", r'Return spam\.'),
|
||||
],
|
||||
'extapi.html': [
|
||||
(".//strong", 'from function: Foo'),
|
||||
(".//strong", 'from class: Bar'),
|
||||
],
|
||||
'markup.html': [
|
||||
|
Loading…
Reference in New Issue
Block a user