Skip to content

Commit

Permalink
feat: add django package option
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Jun 8, 2024
1 parent ce7a668 commit 413ddf3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project/.github/workflows/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
run: poetry install
shell: bash
- name: Test with Pytest
run: poetry run pytest --cov-report=xml
run: poetry run pytest
shell: bash{% endraw %}
{%- endif %}{% raw %}
- name: Upload coverage to Codecov
Expand Down
1 change: 1 addition & 0 deletions project/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ addopts = """\
-Wdefault
--cov={{ package_name }}
--cov-report=term-missing:skip-covered
--cov-report=xml
{%- if is_django_package %}
--ds=tests.settings
{%- endif %}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_generate_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def test_django_package_yes(
),
"run: tox -f py$(echo ${{ matrix.python-version }} | tr -d .)",
],
unexpect_strs=["poetry run pytest --cov-report=xml"],
unexpect_strs=["poetry run pytest"],
)


Expand Down Expand Up @@ -339,7 +339,7 @@ def test_django_package_no(
)
_check_file_contents(
dst_path / ".github" / "workflows" / "ci.yml",
expected_strs=["poetry run pytest --cov-report=xml"],
expected_strs=["poetry run pytest"],
unexpect_strs=[
(
"run: poetry export --without-hashes --only=dev "
Expand Down

0 comments on commit 413ddf3

Please sign in to comment.