Skip to content

Commit 5b6737c

Browse files
committed
Refactor name run_tests to run-tests.py
1 parent 11a3998 commit 5b6737c

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

.tmuxp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"shell_command": [
2020
"command -v .env/bin/tmuxp >/dev/null 2>&1 || { pip install -e .; }",
2121
"command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }",
22-
"watching_testrunner --basepath ./ --pattern=\"*.py\" 'python run_tests.py'"
22+
"watching_testrunner --basepath ./ --pattern=\"*.py\" 'python run-tests.py'"
2323
]
2424
}
2525
],
@@ -71,4 +71,4 @@
7171
],
7272
"session_name": "tmuxp",
7373
"start_directory": "./"
74-
}
74+
}

.tmuxp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ windows:
2121
- shell_command:
2222
- command -v .env/bin/tmuxp >/dev/null 2>&1 || { pip install -e .; }
2323
- command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }
24-
- watching_testrunner --basepath ./ --pattern="*.py" 'python run_tests.py'
24+
- watching_testrunner --basepath ./ --pattern="*.py" 'python run-tests.py'
2525
- window_name: docs
2626
layout: main-horizontal
2727
options:

doc/developing.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Developing and Testing
1212
Our tests are inside ``./tmuxp/testsuite``. Tests are implemented using
1313
:py:mod:`unittest`.
1414

15-
``./run_tests.py`` will create a tmux server on a separate ``socket_name``
15+
``./run-tests.py`` will create a tmux server on a separate ``socket_name``
1616
using ``$ tmux -L test_case``.
1717

1818
.. _install_dev_env:
@@ -64,7 +64,7 @@ folder with its own packages.
6464

6565
.. code-block:: bash
6666
67-
$ ./run_tests.py
67+
$ ./run-tests.py
6868
6969
You probably didn't see anything but tests scroll by.
7070

@@ -83,19 +83,19 @@ Test runner options
8383

8484
.. code-block:: bash
8585
86-
$ ./run_tests.py --tests test_config.ImportExportTest
86+
$ ./run-tests.py --tests test_config.ImportExportTest
8787
8888
Is now equivalent to:
8989

9090
.. code-block:: bash
9191
92-
$ ./run_tests.py --tests tmuxp.testsuite.test_config.ImportExportTest
92+
$ ./run-tests.py --tests tmuxp.testsuite.test_config.ImportExportTest
9393
9494
Testing specific TestSuites, TestCase and tests
9595

9696
.. code-block:: bash
9797
98-
$ ./run_tests.py --help
98+
$ ./run-tests.py --help
9999
100100
Will give you an output of ways you can choose to run tests. Example for
101101
``test_config`` TestSuite:
@@ -104,25 +104,25 @@ By :py:class:`unittest.TestSuite` / module:
104104

105105
.. code-block:: bash
106106
107-
$ ./run_tests.py test_config
107+
$ ./run-tests.py test_config
108108
109109
by :py:class:`unittest.TestCase`:
110110

111111
.. code-block:: bash
112112
113-
$ ./run_tests.py --tests test_config.ImportExportTest
113+
$ ./run-tests.py --tests test_config.ImportExportTest
114114
115115
individual tests:
116116

117117
.. code-block:: bash
118118
119-
$ ./run_tests.py --tests test_config.ImportExportTest.test_export_json
119+
$ ./run-tests.py --tests test_config.ImportExportTest.test_export_json
120120
121121
Multiple can be separated by spaces:
122122

123123
.. code-block:: bash
124124
125-
$ ./run_tests.py --tests ImportExportTest.test_export_json \
125+
$ ./run-tests.py --tests ImportExportTest.test_export_json \
126126
ImportExportTest.test_window
127127
128128
.. _test_builder_visually:
@@ -142,15 +142,15 @@ Create two terminals:
142142

143143
.. code-block:: bash
144144
145-
$ python ./run_tests.py --tests tests_workspacebuilder
145+
$ python ./run-tests.py --tests tests_workspacebuilder
146146
147147
Terminal 1 should have flickered and built the session before your eyes.
148148
tmuxp hides this building from normal users.
149149

150150
Verbosity and logging
151151
'''''''''''''''''''''
152152

153-
``./run_tests.py`` supports two options, these are *optional* flags that
153+
``./run-tests.py`` supports two options, these are *optional* flags that
154154
may be added to for :ref:`test_specific_tests` and
155155
:ref:`test_builder_visually`.
156156

@@ -159,21 +159,21 @@ may be added to for :ref:`test_specific_tests` and
159159

160160
.. code-block:: bash
161161
162-
$ ./run_tests.py --log-level debug
162+
$ ./run-tests.py --log-level debug
163163
164164
short form:
165165

166166
.. code-block:: bash
167167
168-
$ ./run_tests.py -l debug
168+
$ ./run-tests.py -l debug
169169
170170
2. unit test verbosity:
171171

172172
``--verbosity`` may be set to ``0``, ``1`` and ``2``. Default: ``2``.
173173

174174
.. code-block:: bash
175175
176-
$ ./run_tests.py --verbosity 0
176+
$ ./run-tests.py --verbosity 0
177177
178178
Run tests on save
179179
-----------------
@@ -193,13 +193,13 @@ To run all tests upon editing any ``.py`` file:
193193

194194
.. code-block:: bash
195195
196-
$ watching_testrunner --basepath ./ --pattern="*.py" python run_tests.py
196+
$ watching_testrunner --basepath ./ --pattern="*.py" python run-tests.py
197197
198198
To run test where :ref:`test_builder_visually` you may:
199199

200200
.. code-block:: bash
201201
202-
$ watching_testrunner --basepath ./ --pattern="*.py" python run_tests.py --visual
202+
$ watching_testrunner --basepath ./ --pattern="*.py" python run-tests.py --visual
203203
204204
.. _watching_testrunner: https://pypi.python.org/pypi/watching_testrunner/1.0
205205
.. _pypi: https://pypi.python.org/pypi

run-tests.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
"""Test runner for tmuxp project. ``$ ./run_tests.py --help`` for more."""
3+
"""Test runner for tmuxp project. ``$ ./run-tests.py --help`` for more."""
44

55
from __future__ import absolute_import, division, print_function, with_statement
66

@@ -34,7 +34,7 @@ def main(verbosity=2, failfast=False):
3434
Run tests suite for tmuxp. With no arguments, runs all test suites in tmuxp.testsuite.
3535
3636
Default usage:
37-
$ ./run_tests.py
37+
$ ./run-tests.py
3838
''',
3939
formatter_class=argparse.RawTextHelpFormatter
4040
)
@@ -46,24 +46,24 @@ def main(verbosity=2, failfast=False):
4646
Test individual, TestCase or TestSuites, or multiple. Example for test_config TestSuite:
4747
4848
by TestSuite (module):
49-
$ ./run_tests.py test_config
49+
$ ./run-tests.py test_config
5050
5151
by TestCase:
52-
$ ./run_tests.py test_config.ImportExportTest
52+
$ ./run-tests.py test_config.ImportExportTest
5353
individual tests:
54-
$ ./run_tests.py test_config.ImportExportTest.test_export_json
54+
$ ./run-tests.py test_config.ImportExportTest.test_export_json
5555
5656
Multiple can be separated by spaces:
57-
$ ./run_tests.py test_config.ImportExportTest.test_export_json \\
57+
$ ./run-tests.py test_config.ImportExportTest.test_export_json \\
5858
test_config.ImportExportTest.test_window
5959
60-
./run_tests will automatically assume the package namespace ``tmuxp.testsuite``.
60+
./run-tests will automatically assume the package namespace ``tmuxp.testsuite``.
6161
62-
$ ./run_tests.py test_config.ImportExportTest
62+
$ ./run-tests.py test_config.ImportExportTest
6363
6464
is the same as:
6565
66-
$ ./run_tests.py tmuxp.testsuite.test_config.ImportExportTest
66+
$ ./run-tests.py tmuxp.testsuite.test_config.ImportExportTest
6767
'''
6868
)
6969
parser.add_argument('-l', '--log-level', dest='log_level', default='INFO',

0 commit comments

Comments
 (0)