forked from Billingegroup/cookiecutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_utils.py
42 lines (29 loc) · 1010 Bytes
/
test_utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
from pathlib import Path
import pexpect
# This assumes you are running this from a directory called scratch/diffpy.utils
# where scratch is at the same level as dev in your tree.
cc_path = (Path.cwd() / ".." / ".." / "cookiecutter").resolve()
p = pexpect.spawn(f"cookiecutter {cc_path}")
p.expect("github_org .*")
p.sendline("diffpy")
p.expect("keywords .*")
p.sendline("text data parsers, wx grid, diffraction objects")
p.expect("project_name .*")
p.sendline("diffpy.utils")
p.expect("package_dist_name .*")
p.sendline("")
p.expect("package_dir_name .*")
p.sendline("")
p.expect("repo_name .*")
p.sendline("")
p.expect("project_short_description .*")
p.sendline("general purpose shared utilities for the diffpy libraries")
p.expect("minimum_supported_python_version.*")
p.sendline("3.10")
p.expect("maximum_supported_python_version.*")
p.sendline("3.12")
p.expect("Select is_boost_wrapper.*")
p.sendline("2")
# Runs until the cookiecutter is done; then exits.
p.interact()