Skip to content

Commit 770f60b

Browse files
authored
Merge pull request #258 from NLeSC/full-coverage
Full coverage
2 parents d65865e + 031447e commit 770f60b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
python3 -m pip install .[dev]
3333
- name: Run pytest
3434
run: |
35-
pytest
35+
pytest -v

tests/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_pytest(baked_with_development_dependencies):
4040
project_dir, env_bin = baked_with_development_dependencies
4141
pytest_output = run([f'{env_bin}pytest'], project_dir)
4242
assert pytest_output.returncode == 0
43-
assert '== 3 passed in' in pytest_output.stdout
43+
assert '== 4 passed in' in pytest_output.stdout
4444
assert (project_dir / 'coverage.xml').exists()
4545
assert (project_dir / 'htmlcov/index.html').exists()
4646

{{cookiecutter.project_name}}/tests/test_my_module.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
from {{ cookiecutter.package_name }} import my_module
77

88

9+
def test_hello():
10+
assert my_module.hello('nlesc') == 'Hello nlesc!'
11+
12+
913
def test_something():
1014
assert True
1115

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
"""Documentation about the {{ cookiecutter.package_name }} module."""
2-
import logging
3-
4-
5-
logger = logging.getLogger(__name__)
62

73
# FIXME: put actual code here
8-
def example():
9-
logger.info("Providing information about the excecution of the function.")
4+
def hello(name):
5+
return f'Hello {name}!'

0 commit comments

Comments
 (0)