Skip to content

Commit 894b1ac

Browse files
committed
Merge branch 'full-coverage' into 238-linting-template
2 parents 072a4be + 031447e commit 894b1ac

5 files changed

Lines changed: 6 additions & 12 deletions

File tree

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from {{ cookiecutter.package_name }} import my_module
88

99

10-
def test_module_import():
11-
assert my_module not in sys.modules
10+
def test_hello():
11+
assert my_module.hello('nlesc') == 'Hello nlesc!'
1212

1313

1414
def test_something():

{{cookiecutter.project_name}}/{{cookiecutter.package_name}}/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77

88
__author__ = "{{ cookiecutter.full_name }}"
99
__email__ = "{{ cookiecutter.email }}"
10-
__version__ = __version__
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
"""Documentation about the {{ cookiecutter.package_name }} module."""
2-
import logging
3-
4-
5-
logger = logging.getLogger(__name__)
6-
72

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

0 commit comments

Comments
 (0)