-
Notifications
You must be signed in to change notification settings - Fork 4
/
test_utils.py
60 lines (43 loc) · 1.64 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/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()).resolve()
p = pexpect.spawn(f"cookiecutter {cc_path}")
p.expect("github_org .*")
p.sendline("diffpy")
p.expect("module_name .*")
p.sendline("diffpy.utils")
p.expect("repo_name .*")
p.sendline("diffpy.utils")
p.expect("version .*")
p.sendline("3.4.0")
p.expect("Select source.*")
p.sendline("1")
p.expect("project_short_description .*")
p.sendline("Shared utilities for diffpy packages.")
p.expect("project_full_description .*")
p.sendline(
"The diffpy.utils package provides functions for extracting array data "
"from variously formatted text files and wx GUI utilities used by the "
"PDFgui program. The package also includes an interpolation function "
"based on the Whittaker-Shannon formula that can be used to resample "
"a PDF or other profile function over a new grid."
)
p.expect("license_file .*")
p.sendline("LICENSE.txt")
p.expect("recipe_maintainers .*")
p.sendline("sbillinge, Sparks29032, dragonyanglong, CJ-Wright, pavoljuhas")
p.expect("build_requirements .*")
p.sendline("")
p.expect("host_requirements .*")
p.sendline("python >=3.10, setuptools, pip,")
p.expect("runtime_requirements .*")
p.sendline("python >=3.10, setuptools, numpy >= 1.3,")
p.expect("testing_requirements .*")
p.sendline("pytest, pytest-mock, freezegun,")
p.expect("test_these_imports .*")
p.sendline("diffpy, diffpy.utils, diffpy.utils.parsers, diffpy.utils.tests")
# Runs until the cookiecutter is done; then exits.
p.interact()