mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Split up tests for locale patching.
This commit is contained in:
parent
84298debb7
commit
3de93d83d6
@ -43,12 +43,18 @@ def teardown_module():
|
||||
|
||||
@with_app(buildername='text',
|
||||
confoverrides={'language': 'xx', 'locale_dirs': ['.']})
|
||||
def test_patch(app):
|
||||
app.builder.build(['bom', 'subdir/includes'])
|
||||
def test_simple(app):
|
||||
app.builder.build(['bom'])
|
||||
result = (app.outdir / 'bom.txt').text(encoding='utf-8')
|
||||
expect = (u"\nDatei mit UTF-8"
|
||||
u"\n***************\n" # underline matches new translation
|
||||
u"\nThis file has umlauts: äöü.\n")
|
||||
assert result == expect
|
||||
|
||||
|
||||
@with_app(buildername='text',
|
||||
confoverrides={'language': 'xx', 'locale_dirs': ['.']})
|
||||
def test_subdir(app):
|
||||
app.builder.build(['subdir/includes'])
|
||||
result = (app.outdir / 'subdir' / 'includes.txt').text(encoding='utf-8')
|
||||
assert result.startswith(u"\ntranslation\n***********\n\n")
|
||||
|
Loading…
Reference in New Issue
Block a user