Skip to content

Commit 782b688

Browse files
committed
Internal testing script no longer autoruns tox.
1 parent ba3cf7a commit 782b688

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

internal/test.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/usr/bin/env python
22

3-
# This script allows easy testing of the template project. The first argument
4-
# is the directory to which to copy and generate the template project. All
5-
# other arguments go directly to tox.
3+
# This script allows easy testing of the template project. The only argument
4+
# is the directory to which to copy and generate the template project.
65

76
from __future__ import print_function
87
import os
@@ -11,8 +10,8 @@
1110

1211

1312
def main(argv):
14-
if len(argv) == 1:
15-
print('Usage: {0} GEN_PATH [TOX_ARGS...]', file=sys.stderr)
13+
if len(argv) != 2:
14+
raise SystemExit('Usage: {0} GEN_PATH'.format(argv[0]))
1615

1716
# Get the project root directory.
1817
project_root = os.path.dirname(os.path.dirname(
@@ -28,13 +27,18 @@ def main(argv):
2827
import generate
2928
generate.main()
3029

30+
# Don't run tox for now, because there are reasons to generate the project
31+
# and not run tox immediately, such as testing sdist, testing Paver tasks,
32+
# etc. Just suggest running `tox' or `detox' manually afterward in the
33+
# shell script.
34+
3135
# Run tox.
32-
import tox
36+
# import tox
3337
# tox will raise SystemExit() and try to exit. We don't want that.
34-
try:
35-
tox.cmdline(argv[2:])
36-
except SystemExit:
37-
pass
38+
# try:
39+
# tox.cmdline(argv[2:])
40+
# except SystemExit:
41+
# pass
3842

3943
# Print out the directory name for the shell script.
4044
print(temp_dir)

internal/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ ppt_finished() {
2323
}
2424

2525
echo
26+
echo "Run \`tox' or \`detox' to test the project."
2627
echo "Run \`ppt_finished' when done to return to the template project and delete this directory."

0 commit comments

Comments
 (0)