cleanup py.test.* namespace, docstrings for improved pydoc and interactive usage.

use new apipkg __onfirstaccess__ feature to initialize the py.test namespace with the default plugins.  This, besides other good implications, means that you can now type:  pydoc py.test   or help(py.test)

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-12-29 16:29:48 +01:00
parent 080fd2880e
commit db21cac694
13 changed files with 98 additions and 36 deletions

View File

@@ -1,10 +1,10 @@
import py
from py.plugin.pytest_mark import Mark
from py.plugin.pytest_mark import MarkGenerator as Mark
class TestMark:
def test_pytest_mark_notcallable(self):
mark = Mark()
py.test.raises(TypeError, "mark()")
py.test.raises((AttributeError, TypeError), "mark()")
def test_pytest_mark_bare(self):
mark = Mark()