mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Filter warnings on testing
This commit is contained in:
parent
0f4514a69c
commit
0ccc64d9ea
@ -58,6 +58,8 @@ def test_extension_in_blacklist(app, status, warning):
|
||||
|
||||
|
||||
@pytest.mark.sphinx(testroot='add_source_parser')
|
||||
@pytest.mark.filterwarnings('ignore:The config variable "source_parsers"')
|
||||
@pytest.mark.filterwarnings('ignore:app.add_source_parser\\(\\) does not support suffix')
|
||||
def test_add_source_parser(app, status, warning):
|
||||
assert set(app.config.source_suffix) == set(['.rst', '.md', '.test'])
|
||||
|
||||
|
@ -1470,6 +1470,7 @@ def test_partialmethod(app):
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
@pytest.mark.filterwarnings('ignore:autodoc_default_flags is now deprecated.')
|
||||
def test_merge_autodoc_default_flags1(app):
|
||||
app.config.autodoc_default_flags = ['members', 'undoc-members']
|
||||
merge_autodoc_default_flags(app, app.config)
|
||||
@ -1478,6 +1479,7 @@ def test_merge_autodoc_default_flags1(app):
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
@pytest.mark.filterwarnings('ignore:autodoc_default_flags is now deprecated.')
|
||||
def test_merge_autodoc_default_flags2(app):
|
||||
app.config.autodoc_default_flags = ['members', 'undoc-members']
|
||||
app.config.autodoc_default_options = {'members': 'this,that,order',
|
||||
|
@ -144,6 +144,7 @@ def test_get_catalogs_from_multiple_locale_dirs(tempdir):
|
||||
assert domains == ['test1', 'test1', 'test2']
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings('ignore:gettext_compact argument')
|
||||
def test_get_catalogs_with_compact(tempdir):
|
||||
(tempdir / 'loc1' / 'xx' / 'LC_MESSAGES').makedirs()
|
||||
(tempdir / 'loc1' / 'xx' / 'LC_MESSAGES' / 'test1.po').write_text('#')
|
||||
|
@ -34,6 +34,7 @@ def test_get_image_size(testroot):
|
||||
assert get_image_size(testroot / TXT_FILENAME) is None
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings('ignore:The content argument')
|
||||
def test_guess_mimetype(testroot):
|
||||
# guess by filename
|
||||
assert guess_mimetype('img.png') == 'image/png'
|
||||
|
Loading…
Reference in New Issue
Block a user