forked from github/pelican
Add Invoke task for updating functional test output
This commit is contained in:
parent
703c281089
commit
b7368f919f
2 changed files with 17 additions and 8 deletions
|
|
@ -86,14 +86,9 @@ output." If you have made changes that affect the HTML output generated by
|
|||
Pelican, and the changes to that output are expected and deemed correct given
|
||||
the nature of your changes, then you should update the output used by the
|
||||
functional tests. To do so, **make sure you have both** ``en_EN.utf8`` **and**
|
||||
``fr_FR.utf8`` **locales installed**, and then run the following two commands::
|
||||
``fr_FR.utf8`` **locales installed**, and then run the following command::
|
||||
|
||||
LC_ALL=en_US.utf8 pelican -o pelican/tests/output/custom/ \
|
||||
-s samples/pelican.conf.py samples/content/
|
||||
LC_ALL=fr_FR.utf8 pelican -o pelican/tests/output/custom_locale/ \
|
||||
-s samples/pelican.conf_FR.py samples/content/
|
||||
LC_ALL=en_US.utf8 pelican -o pelican/tests/output/basic/ \
|
||||
samples/content/
|
||||
invoke update-functional-tests
|
||||
|
||||
You may also find that some tests are skipped because some dependency (e.g.,
|
||||
Pandoc) is not installed. This does not automatically mean that these tests
|
||||
|
|
|
|||
14
tasks.py
14
tasks.py
|
|
@ -79,3 +79,17 @@ def setup(c):
|
|||
tools(c)
|
||||
c.run(f"{POETRY} install")
|
||||
precommit(c)
|
||||
|
||||
|
||||
@task
|
||||
def update_functional_tests(c):
|
||||
"""Update the generated functional test output"""
|
||||
c.run(
|
||||
f"bash -c 'LC_ALL=en_US.utf8 pelican -o {PKG_PATH}/tests/output/custom/ -s samples/pelican.conf.py samples/content/'"
|
||||
)
|
||||
c.run(
|
||||
f"bash -c 'LC_ALL=fr_FR.utf8 pelican -o {PKG_PATH}/tests/output/custom_locale/ -s samples/pelican.conf_FR.py samples/content/'"
|
||||
)
|
||||
c.run(
|
||||
f"bash -c 'LC_ALL=en_US.utf8 pelican -o {PKG_PATH}/tests/output/basic/ samples/content/'"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue