summaryrefslogtreecommitdiff
path: root/logilab/common/pytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'logilab/common/pytest.py')
-rw-r--r--logilab/common/pytest.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/logilab/common/pytest.py b/logilab/common/pytest.py
index f5fb8ff..c02a748 100644
--- a/logilab/common/pytest.py
+++ b/logilab/common/pytest.py
@@ -15,14 +15,14 @@
#
# You should have received a copy of the GNU Lesser General Public License along
# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
-"""pytest is a tool that eases test running and debugging.
+"""logilab-pytest is a tool that eases test running and debugging.
-To be able to use pytest, you should either write tests using
+To be able to use logilab-pytest, you should either write tests using
the logilab.common.testlib's framework or the unittest module of the
Python's standard library.
-You can customize pytest's behaviour by defining a ``pytestconf.py`` file
-somewhere in your test directory. In this file, you can add options or
+You can customize logilab-pytest's behaviour by defining a ``pytestconf.py``
+file somewhere in your test directory. In this file, you can add options or
change the way tests are run.
To add command line options, you must define a ``update_parser`` function in
@@ -31,8 +31,8 @@ that will be the OptionParser's instance to customize.
If you wish to customize the tester, you'll have to define a class named
``CustomPyTester``. This class should extend the default `PyTester` class
-defined in the pytest module. Take a look at the `PyTester` and `DjangoTester`
-classes for more information about what can be done.
+defined in the logilab.common.pytest module. Take a look at the `PyTester` and
+`DjangoTester` classes for more information about what can be done.
For instance, if you wish to add a custom -l option to specify a loglevel, you
could define the following ``pytestconf.py`` file ::
@@ -101,13 +101,13 @@ PYTEST_DOC = """%prog [OPTIONS] [testfile [testpattern]]
examples:
-pytest path/to/mytests.py
-pytest path/to/mytests.py TheseTests
-pytest path/to/mytests.py TheseTests.test_thisone
-pytest path/to/mytests.py -m '(not long and database) or regr'
+logilab-pytest path/to/mytests.py
+logilab-pytest path/to/mytests.py TheseTests
+logilab-pytest path/to/mytests.py TheseTests.test_thisone
+logilab-pytest path/to/mytests.py -m '(not long and database) or regr'
-pytest one (will run both test_thisone and test_thatone)
-pytest path/to/mytests.py -s not (will skip test_notthisone)
+logilab-pytest one (will run both test_thisone and test_thatone)
+logilab-pytest path/to/mytests.py -s not (will skip test_notthisone)
"""
ENABLE_DBC = False
@@ -558,12 +558,12 @@ def make_parser():
warnings.simplefilter('ignore', DeprecationWarning)
rebuild_cmdline(option, opt, value, parser)
- # pytest options
+ # logilab-pytest options
parser.add_option('-t', dest='testdir', default=None,
help="directory where the tests will be found")
parser.add_option('-d', dest='dbc', default=False,
action="store_true", help="enable design-by-contract")
- # unittest_main options provided and passed through pytest
+ # unittest_main options provided and passed through logilab-pytest
parser.add_option('-v', '--verbose', callback=rebuild_cmdline,
action="callback", help="Verbose output")
parser.add_option('-i', '--pdb', callback=rebuild_and_store,
@@ -572,7 +572,7 @@ def make_parser():
parser.add_option('-x', '--exitfirst', callback=rebuild_and_store,
dest="exitfirst", default=False,
action="callback", help="Exit on first failure "
- "(only make sense when pytest run one test file)")
+ "(only make sense when logilab-pytest run one test file)")
parser.add_option('-R', '--restart', callback=rebuild_and_store,
dest="restart", default=False,
action="callback",
@@ -598,7 +598,7 @@ def make_parser():
if DJANGO_FOUND:
parser.add_option('-J', '--django', dest='django', default=False,
action="store_true",
- help='use pytest for django test cases')
+ help='use logilab-pytest for django test cases')
return parser