Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit c002511

Browse files
committed
Increase coverage
1 parent a180c46 commit c002511

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

tests/test_dls_python3_skeleton.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pytest
77

8-
from dls_python3_skeleton import __version__
8+
from dls_python3_skeleton import __main__, __version__
99

1010

1111
def check_output(*args, cwd=None) -> str:
@@ -56,3 +56,32 @@ def test_new_module(tmp_path: Path):
5656
assert "Please change ./docs/reference/api.rst" in out
5757
assert "Please delete ./docs/how-to/accomplish-a-task.rst" in out
5858
assert "Please delete ./docs/explanations/why-is-something-so.rst" in out
59+
60+
61+
def test_existing_module(tmp_path: Path):
62+
module = tmp_path / "scanspec"
63+
__main__.git(
64+
"clone",
65+
"--depth",
66+
"1",
67+
"--branch",
68+
"0.5.3",
69+
"https://github.com/dls-controls/scanspec",
70+
str(module),
71+
)
72+
output = check_output(
73+
sys.executable,
74+
"-m",
75+
"dls_python3_skeleton",
76+
"existing",
77+
str(module),
78+
)
79+
assert output.endswith(
80+
"""
81+
Automatic merge failed; fix conflicts and then commit the result.
82+
83+
Please fix the conflicts above, then you can run:
84+
git branch -d skeleton-merge-branch
85+
Instructions on how to develop this module are in CONTRIBUTING.rst
86+
"""
87+
)

0 commit comments

Comments
 (0)