mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +03:00
Adding test to validate pycharm docs are removed appropriately
This commit is contained in:
parent
7b4a0bafb6
commit
6b5ad4e833
|
@ -282,3 +282,20 @@ def test_error_if_incompatible(cookies, context, invalid_context):
|
|||
|
||||
assert result.exit_code != 0
|
||||
assert isinstance(result.exception, FailedHookException)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
["use_pycharm", "pycharm_docs_exist"],
|
||||
[
|
||||
("n", False),
|
||||
("y", True),
|
||||
],
|
||||
)
|
||||
def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist):
|
||||
"""."""
|
||||
context.update({"use_pycharm": use_pycharm})
|
||||
result = cookies.bake(extra_context=context)
|
||||
|
||||
with open(f"{result.project}/docs/index.rst", "r") as f:
|
||||
has_pycharm_docs = 'pycharm/configuration' in f.read()
|
||||
assert has_pycharm_docs == pycharm_docs_exist
|
||||
|
|
Loading…
Reference in New Issue
Block a user