Skip to content

Commit

Permalink
Encourage "python -m tornado.test.runtests" as the way to run the tests.
Browse files Browse the repository at this point in the history
Remove execute bit from tornado/test/runtests.py, which would unexpectedly
run the tests from a globally-installed version of tornado when run directly.
Add a new runtests.sh to make the recommended behavior more discoverable.
Remove run_pyversion_tests.py, which has been superceded by tox.
Update docs.

Closes #545.
  • Loading branch information
bdarnell committed Jun 25, 2012
1 parent d37ac92 commit ef9df4d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 42 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -9,4 +9,5 @@ include tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.mo
include tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.po
include tornado/test/static/robots.txt
include tornado/test/templates/utf8.html
include runtests.sh
global-exclude _auto2to3*
10 changes: 10 additions & 0 deletions runtests.sh
@@ -0,0 +1,10 @@
#!/bin/sh

cd $(dirname $0)

# "python -m" differs from "python tornado/test/runtests.py" in how it sets
# up the default python path. "python -m" uses the current directory,
# while "python file.py" uses the directory containing "file.py" (which is
# not what you want if file.py appears within a package you want to import
# from)
python -m tornado.test.runtests "$@"
40 changes: 0 additions & 40 deletions tornado/test/run_pyversion_tests.py

This file was deleted.

Empty file modified tornado/test/runtests.py 100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions tornado/testing.py
Expand Up @@ -388,9 +388,9 @@ def main():
be overridden by naming a single test on the command line::
# Runs all tests
tornado/test/runtests.py
python -m tornado.test.runtests
# Runs one test
tornado/test/runtests.py tornado.test.stack_context_test
python -m tornado.test.runtests tornado.test.stack_context_test
"""
from tornado.options import define, options, parse_command_line
Expand Down

0 comments on commit ef9df4d

Please sign in to comment.