Skip to content

Commit

Permalink
fix: conftest added to stop warning message in coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtmurphy committed Jan 13, 2024
1 parent 1f943f4 commit dacd6ad
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 3 deletions.
86 changes: 85 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ authors = ["mwtmurphy <[email protected]>"]
python = "3.10.*"
cookiecutter = "^2.2.3"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.4"
click = "^8.1.7"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ def main(example: int):
'''

execution_type = "default" if example == 1 else "custom"
response = f"main execute in mode: {execution_type}"
response = f"main executed in mode: {execution_type}"

return response
4 changes: 4 additions & 0 deletions {{cookiecutter.directory_name}}/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# tests/conftest.py

def pytest_configure(config):
config.addinivalue_line("markers", "e2e: mark as end-to-end test.")
2 changes: 1 addition & 1 deletion {{cookiecutter.directory_name}}/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def runner():
return testing.CliRunner()

@mark.e2e
def test_main_succeeds(runner: testing.CliRunner, is_caching: bool):
def test_main_succeeds(runner: testing.CliRunner):
'''Validates main function executes without failing.
Arguments:
Expand Down

0 comments on commit dacd6ad

Please sign in to comment.