mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-03 19:34:43 +00:00
28 lines
645 B
Python
28 lines
645 B
Python
|
|
"""Djlint tests specific to .djlintrc configuration.
|
||
|
|
|
||
|
|
run::
|
||
|
|
|
||
|
|
pytest tests/test_config/test_json/test_config.py --cov=src/djlint --cov-branch \
|
||
|
|
--cov-report xml:coverage.xml --cov-report term-missing
|
||
|
|
|
||
|
|
pytest tests/test_config/test_json/test_config.py::test_config
|
||
|
|
|
||
|
|
"""
|
||
|
|
# pylint: disable=C0116
|
||
|
|
|
||
|
|
from click.testing import CliRunner
|
||
|
|
|
||
|
|
from src.djlint import main as djlint
|
||
|
|
|
||
|
|
|
||
|
|
def test_config(runner: CliRunner) -> None:
|
||
|
|
result = runner.invoke(
|
||
|
|
djlint,
|
||
|
|
[
|
||
|
|
"tests/test_config/test_scripts_styles/html.html",
|
||
|
|
"--check",
|
||
|
|
],
|
||
|
|
)
|
||
|
|
print(result.output)
|
||
|
|
assert result.exit_code == 0
|