mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix flake8 and style-check violations
This commit is contained in:
@@ -197,28 +197,28 @@ def test_text_inconsistency_warnings(app, warning):
|
||||
expected_warning_expr = (
|
||||
warning_fmt % {
|
||||
u'reftype': u'footnote references',
|
||||
u'original': u"\[u?'\[#\]_'\]",
|
||||
u'translated': u"\[\]"
|
||||
u'original': u"\\[u?'\\[#\\]_'\\]",
|
||||
u'translated': u"\\[\\]"
|
||||
} +
|
||||
warning_fmt % {
|
||||
u'reftype': u'footnote references',
|
||||
u'original': u"\[u?'\[100\]_'\]",
|
||||
u'translated': u"\[\]"
|
||||
u'original': u"\\[u?'\\[100\\]_'\\]",
|
||||
u'translated': u"\\[\\]"
|
||||
} +
|
||||
warning_fmt % {
|
||||
u'reftype': u'references',
|
||||
u'original': u"\[u?'reference_'\]",
|
||||
u'translated': u"\[u?'reference_', u?'reference_'\]"
|
||||
u'original': u"\\[u?'reference_'\\]",
|
||||
u'translated': u"\\[u?'reference_', u?'reference_'\\]"
|
||||
} +
|
||||
warning_fmt % {
|
||||
u'reftype': u'references',
|
||||
u'original': u"\[\]",
|
||||
u'translated': u"\[u?'`I18N WITH REFS INCONSISTENCY`_'\]"
|
||||
u'original': u"\\[\\]",
|
||||
u'translated': u"\\[u?'`I18N WITH REFS INCONSISTENCY`_'\\]"
|
||||
})
|
||||
assert_re_search(expected_warning_expr, warnings)
|
||||
|
||||
expected_citation_warning_expr = (
|
||||
u'.*/refs_inconsistency.txt:\\d+: WARNING: Citation \[ref2\] is not referenced.\n' +
|
||||
u'.*/refs_inconsistency.txt:\\d+: WARNING: Citation \\[ref2\\] is not referenced.\n' +
|
||||
u'.*/refs_inconsistency.txt:\\d+: WARNING: citation not found: ref3')
|
||||
assert_re_search(expected_citation_warning_expr, warnings)
|
||||
|
||||
@@ -300,8 +300,8 @@ def test_text_glossary_term_inconsistencies(app, warning):
|
||||
expected_warning_expr = (
|
||||
u'.*/glossary_terms_inconsistency.txt:\\d+: '
|
||||
u'WARNING: inconsistent term references in translated message.'
|
||||
u" original: \[u?':term:`Some term`', u?':term:`Some other term`'\],"
|
||||
u" translated: \[u?':term:`SOME NEW TERM`'\]\n")
|
||||
u" original: \\[u?':term:`Some term`', u?':term:`Some other term`'\\],"
|
||||
u" translated: \\[u?':term:`SOME NEW TERM`'\\]\n")
|
||||
assert_re_search(expected_warning_expr, warnings)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user