mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[tests] fix flakiness of `test_linkcheck_exclude_documents` (#12189)
This commit is contained in:
@@ -1011,21 +1011,20 @@ def test_linkcheck_exclude_documents(app):
|
|||||||
with open(app.outdir / 'output.json', encoding='utf-8') as fp:
|
with open(app.outdir / 'output.json', encoding='utf-8') as fp:
|
||||||
content = [json.loads(record) for record in fp]
|
content = [json.loads(record) for record in fp]
|
||||||
|
|
||||||
assert content == [
|
assert len(content) == 2
|
||||||
{
|
assert {
|
||||||
'filename': 'broken_link.rst',
|
'filename': 'broken_link.rst',
|
||||||
'lineno': 4,
|
'lineno': 4,
|
||||||
'status': 'ignored',
|
'status': 'ignored',
|
||||||
'code': 0,
|
'code': 0,
|
||||||
'uri': 'https://www.sphinx-doc.org/this-is-a-broken-link',
|
'uri': 'https://www.sphinx-doc.org/this-is-a-broken-link',
|
||||||
'info': 'broken_link matched ^broken_link$ from linkcheck_exclude_documents',
|
'info': 'broken_link matched ^broken_link$ from linkcheck_exclude_documents',
|
||||||
},
|
} in content
|
||||||
{
|
assert {
|
||||||
'filename': 'br0ken_link.rst',
|
'filename': 'br0ken_link.rst',
|
||||||
'lineno': 4,
|
'lineno': 4,
|
||||||
'status': 'ignored',
|
'status': 'ignored',
|
||||||
'code': 0,
|
'code': 0,
|
||||||
'uri': 'https://www.sphinx-doc.org/this-is-another-broken-link',
|
'uri': 'https://www.sphinx-doc.org/this-is-another-broken-link',
|
||||||
'info': 'br0ken_link matched br[0-9]ken_link from linkcheck_exclude_documents',
|
'info': 'br0ken_link matched br[0-9]ken_link from linkcheck_exclude_documents',
|
||||||
},
|
} in content
|
||||||
]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user