-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #760 from Riverside-Healthcare/dev
- Loading branch information
Showing
6 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/test_config/test_config_pyproject/subfolder/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[tool.djlint] | ||
profile = "django" | ||
indent = 2 | ||
ignore = "" | ||
files = [ | ||
"./tests/test_config/test_config_pyproject/test.html", | ||
"./tests/test_config/test_config_pyproject/test_two.html" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div> | ||
<p></p> | ||
</div> |
27 changes: 27 additions & 0 deletions
27
tests/test_config/test_config_pyproject/test_config_pyproject.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Djlint tests specific to custom file path. | ||
run:: | ||
pytest tests/test_config/test_config_pyproject/test.py --cov=src/djlint --cov-branch \ | ||
--cov-report xml:coverage.xml --cov-report term-missing | ||
pytest tests/test_config/test_config_pyproject/test.py::test_check_pyproject_as_config | ||
""" | ||
|
||
from click.testing import CliRunner | ||
|
||
from src.djlint import main as djlint | ||
|
||
|
||
def test_check_pyproject_as_config(runner: CliRunner) -> None: | ||
result = runner.invoke( | ||
djlint, | ||
[ | ||
"-", | ||
"--check", | ||
"--configuration", | ||
"tests/test_config/test_config_pyproject/subfolder/pyproject.toml", | ||
], | ||
) | ||
assert """Checking 2/2 files""" in result.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div> |