summaryrefslogtreecommitdiff
path: root/pytest.py
diff options
context:
space:
mode:
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>2008-05-07 11:27:53 +0200
committerAdrien Di Mascio <Adrien.DiMascio@logilab.fr>2008-05-07 11:27:53 +0200
commite26e5f5b7f10de0408bbf1fecf0d96701811f742 (patch)
tree0d5164fe0b57b7c08f6003ead506202b72eaa217 /pytest.py
parentfe2cdc4ea2da31261e46ea5b5ff5fb5218b882dc (diff)
downloadlogilab-common-e26e5f5b7f10de0408bbf1fecf0d96701811f742.tar.gz
add some doc about TestCase.optval()
Diffstat (limited to 'pytest.py')
-rw-r--r--pytest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pytest.py b/pytest.py
index 625b6c8..8806ca0 100644
--- a/pytest.py
+++ b/pytest.py
@@ -39,6 +39,15 @@ could define the following ``pytestconf.py`` file ::
logger = logging.getLogger('erudi')
logger.setLevel(logging.getLevelName(loglevel))
+
+In your TestCase class you can then get the value of a specific option with
+the ``optval`` method::
+
+ class MyTestCase(TestCase):
+ def test_foo(self):
+ loglevel = self.optval('loglevel')
+ # ...
+
"""
PYTEST_DOC = """%prog [OPTIONS] [testfile [testpattern]]