| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 from __future__ import print_function | 3 from __future__ import print_function |
| 4 | 4 |
| 5 import argparse | 5 import argparse |
| 6 import os | 6 import os |
| 7 import subprocess | 7 import subprocess |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from tools import cov | 10 from tools import cov |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 call([sys.executable, 'setup.py', 'install'] + argv) | 132 call([sys.executable, 'setup.py', 'install'] + argv) |
| 133 | 133 |
| 134 | 134 |
| 135 def run_lint(args): | 135 def run_lint(args): |
| 136 call('pylint --rcfile=pylintrc */*.py */*/*.py', shell=True) | 136 call('pylint --rcfile=pylintrc */*.py */*/*.py', shell=True) |
| 137 call('pep8 *.py */*.py */*/*.py', shell=True) | 137 call('pep8 *.py */*.py */*/*.py', shell=True) |
| 138 | 138 |
| 139 | 139 |
| 140 def run_tests(args): | 140 def run_tests(args): |
| 141 # Tests that we can run the command line directly if typ is in sys.path. | 141 # Tests that we can run the command line directly if typ is in sys.path. |
| 142 call(['python', os.path.join('typ', 'cmdline.py'), | 142 call(['python', os.path.join('typ', 'runner.py'), |
| 143 'typ.tests.main_test.TestMain.test_basic']) | 143 'typ.tests.main_test.TestMain.test_basic']) |
| 144 | 144 |
| 145 # Test that we can run the command line directly if typ is not in sys.path. | 145 # Test that we can run the command line directly if typ is not in sys.path. |
| 146 repo_dir = os.path.abspath(os.path.dirname(__file__)) | 146 repo_dir = os.path.abspath(os.path.dirname(__file__)) |
| 147 home_dir = os.environ['HOME'] | 147 home_dir = os.environ['HOME'] |
| 148 call(['python', os.path.join(repo_dir, 'typ', 'cmdline.py'), | 148 call(['python', os.path.join(repo_dir, 'typ', 'runner.py'), |
| 149 'typ.tests.main_test.TestMain.test_basic'], cwd=home_dir) | 149 'typ.tests.main_test.TestMain.test_basic'], cwd=home_dir) |
| 150 | 150 |
| 151 # Now run all the tests under Python2 and Python3. | 151 # Now run all the tests under Python2 and Python3. |
| 152 call(['python', '-m', 'typ']) | 152 call(['python', '-m', 'typ']) |
| 153 if has_python34: | 153 if has_python34: |
| 154 call(['python3', '-m', 'typ']) | 154 call(['python3', '-m', 'typ']) |
| 155 | 155 |
| 156 | 156 |
| 157 if __name__ == '__main__': | 157 if __name__ == '__main__': |
| 158 sys.exit(main(sys.argv[1:])) | 158 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |