mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
@@ -53,5 +53,7 @@ test-tocdepth
|
||||
* Section.1 is :numref:`foo`
|
||||
* Section.2.1 is :numref:`bar_a`
|
||||
* Unnumbered section is :numref:`index`
|
||||
* Invalid numfig_format 01: :numref:`invalid <fig1>`
|
||||
* Invalid numfig_format 02: :numref:`Fig %s %s <fig1>`
|
||||
* Fig.1 is :numref:`Fig.{number} {name} <fig1>`
|
||||
* Section.1 is :numref:`Sect.{number} {name} <foo>`
|
||||
|
||||
@@ -506,6 +506,8 @@ def test_numfig_disabled(app, status, warning):
|
||||
warnings = warning.getvalue()
|
||||
assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' in warnings
|
||||
assert 'index.rst:55: WARNING: no number is assigned for section: index' not in warnings
|
||||
assert 'index.rst:56: WARNING: invalid numfig_format: invalid' not in warnings
|
||||
assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' not in warnings
|
||||
|
||||
expects = {
|
||||
'index.html': [
|
||||
@@ -568,6 +570,8 @@ def test_numfig_without_numbered_toctree(app, status, warning):
|
||||
warnings = warning.getvalue()
|
||||
assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings
|
||||
assert 'index.rst:55: WARNING: no number is assigned for section: index' in warnings
|
||||
assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings
|
||||
assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings
|
||||
|
||||
expects = {
|
||||
'index.html': [
|
||||
@@ -666,6 +670,8 @@ def test_numfig_with_numbered_toctree(app, status, warning):
|
||||
warnings = warning.getvalue()
|
||||
assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings
|
||||
assert 'index.rst:55: WARNING: no number is assigned for section: index' in warnings
|
||||
assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings
|
||||
assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings
|
||||
|
||||
expects = {
|
||||
'index.html': [
|
||||
@@ -768,6 +774,8 @@ def test_numfig_with_prefix(app, status, warning):
|
||||
warnings = warning.getvalue()
|
||||
assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings
|
||||
assert 'index.rst:55: WARNING: no number is assigned for section: index' in warnings
|
||||
assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings
|
||||
assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings
|
||||
|
||||
expects = {
|
||||
'index.html': [
|
||||
@@ -866,6 +874,8 @@ def test_numfig_with_secnum_depth(app, status, warning):
|
||||
warnings = warning.getvalue()
|
||||
assert 'index.rst:47: WARNING: numfig is disabled. :numref: is ignored.' not in warnings
|
||||
assert 'index.rst:55: WARNING: no number is assigned for section: index' in warnings
|
||||
assert 'index.rst:56: WARNING: invalid numfig_format: invalid' in warnings
|
||||
assert 'index.rst:57: WARNING: invalid numfig_format: Fig %s %s' in warnings
|
||||
|
||||
expects = {
|
||||
'index.html': [
|
||||
|
||||
Reference in New Issue
Block a user