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
|
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):
|
class ClassDirective(Directive):
|
||||||
option_spec = {'opt': lambda x: x}
|
option_spec = {'opt': lambda x: x}
|
||||||
|
|
||||||
@ -108,7 +103,6 @@ def setup(app):
|
|||||||
import parsermod
|
import parsermod
|
||||||
|
|
||||||
app.add_config_value('value_from_conf_py', 42, False)
|
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_directive('clsdir', ClassDirective)
|
||||||
app.add_object_type('userdesc', 'userdescrole', '%s (userdesc)',
|
app.add_object_type('userdesc', 'userdescrole', '%s (userdesc)',
|
||||||
userdesc_parse, objname='user desc')
|
userdesc_parse, objname='user desc')
|
||||||
|
@ -3,8 +3,5 @@ Extension API tests
|
|||||||
|
|
||||||
Testing directives:
|
Testing directives:
|
||||||
|
|
||||||
.. funcdir::
|
|
||||||
:opt: Foo
|
|
||||||
|
|
||||||
.. clsdir::
|
.. clsdir::
|
||||||
:opt: Bar
|
:opt: Bar
|
||||||
|
@ -186,7 +186,6 @@ def test_html_warnings(app, warning):
|
|||||||
(".//dd/p", r'Return spam\.'),
|
(".//dd/p", r'Return spam\.'),
|
||||||
],
|
],
|
||||||
'extapi.html': [
|
'extapi.html': [
|
||||||
(".//strong", 'from function: Foo'),
|
|
||||||
(".//strong", 'from class: Bar'),
|
(".//strong", 'from class: Bar'),
|
||||||
],
|
],
|
||||||
'markup.html': [
|
'markup.html': [
|
||||||
|
@ -95,7 +95,6 @@ def cached_etree_parse():
|
|||||||
(".//dd/p", r'Return spam\.'),
|
(".//dd/p", r'Return spam\.'),
|
||||||
],
|
],
|
||||||
'extapi.html': [
|
'extapi.html': [
|
||||||
(".//strong", 'from function: Foo'),
|
|
||||||
(".//strong", 'from class: Bar'),
|
(".//strong", 'from class: Bar'),
|
||||||
],
|
],
|
||||||
'markup.html': [
|
'markup.html': [
|
||||||
|
Loading…
Reference in New Issue
Block a user