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

Commit 499944d

Browse files
OCoppingcoretl
authored andcommitted
Added test for 'clean' option
1 parent d6da4f4 commit 499944d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test_dls_python3_skeleton.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,28 @@ def test_existing_module(tmp_path: Path):
9595
Instructions on how to develop this module are in CONTRIBUTING.rst
9696
"""
9797
)
98+
99+
100+
def test_clean_existing(tmp_path: Path):
101+
MERGE_BRANCH = "skeleton-merge-branch"
102+
module = tmp_path / "scanspec"
103+
__main__.git(
104+
"clone",
105+
"--depth",
106+
"1",
107+
"--branch",
108+
"0.5.3",
109+
"https://github.com/dls-controls/scanspec",
110+
str(module),
111+
)
112+
__main__.git("checkout", "-b", f"{MERGE_BRANCH}", cwd=str(module))
113+
__main__.git("checkout", "-", cwd=str(module))
114+
output = check_output(
115+
sys.executable,
116+
"-m",
117+
"dls_python3_skeleton",
118+
"clean",
119+
".",
120+
cwd=str(module),
121+
)
122+
assert output.strip("\n") == f"{MERGE_BRANCH} deleted from existing repo"

0 commit comments

Comments
 (0)