This repository was archived by the owner on Mar 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 55
66import pytest
77
8- from dls_python3_skeleton import __version__
8+ from dls_python3_skeleton import __main__ , __version__
99
1010
1111def 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+ )
You can’t perform that action at this time.
0 commit comments