fix issue48 - test and fix typo in MarkInfo repr

This commit is contained in:
holger krekel 2011-06-01 08:03:06 +02:00
parent 5dfce4a0ca
commit 67859158d4
3 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Changes between 2.0.3 and 2.1.0.DEV
- fix issue43: improve doctests with better traceback reporting on
unexpected exceptions
- fix issue47: timing output in junitxml for test cases is now correct
- fix issue48: typo in MarkInfo repr leading to exception
- introduce XXX pytest_configure_funcargs hack (thanks Ronny)
- env/username expansion for junitxml file path (fixes issue44)

View File

@ -153,7 +153,7 @@ class MarkInfo:
def __repr__(self):
return "<MarkInfo %r args=%r kwargs=%r>" % (
self._name, self.args, self.kwargs)
self.name, self.args, self.kwargs)
def pytest_itemcollected(item):
if not isinstance(item, pytest.Function):

View File

@ -2,6 +2,11 @@ import py, pytest
from _pytest.mark import MarkGenerator as Mark
class TestMark:
def test_markinfo_repr(self):
from _pytest.mark import MarkInfo
m = MarkInfo("hello", (1,2), {})
repr(m)
def test_pytest_exists_in_namespace_all(self):
assert 'mark' in py.test.__all__
assert 'mark' in pytest.__all__