fix issue48 - test and fix typo in MarkInfo repr
This commit is contained in:
parent
5dfce4a0ca
commit
67859158d4
|
@ -8,6 +8,7 @@ Changes between 2.0.3 and 2.1.0.DEV
|
||||||
- fix issue43: improve doctests with better traceback reporting on
|
- fix issue43: improve doctests with better traceback reporting on
|
||||||
unexpected exceptions
|
unexpected exceptions
|
||||||
- fix issue47: timing output in junitxml for test cases is now correct
|
- 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)
|
- introduce XXX pytest_configure_funcargs hack (thanks Ronny)
|
||||||
- env/username expansion for junitxml file path (fixes issue44)
|
- env/username expansion for junitxml file path (fixes issue44)
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ class MarkInfo:
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<MarkInfo %r args=%r kwargs=%r>" % (
|
return "<MarkInfo %r args=%r kwargs=%r>" % (
|
||||||
self._name, self.args, self.kwargs)
|
self.name, self.args, self.kwargs)
|
||||||
|
|
||||||
def pytest_itemcollected(item):
|
def pytest_itemcollected(item):
|
||||||
if not isinstance(item, pytest.Function):
|
if not isinstance(item, pytest.Function):
|
||||||
|
|
|
@ -2,6 +2,11 @@ import py, pytest
|
||||||
from _pytest.mark import MarkGenerator as Mark
|
from _pytest.mark import MarkGenerator as Mark
|
||||||
|
|
||||||
class TestMark:
|
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):
|
def test_pytest_exists_in_namespace_all(self):
|
||||||
assert 'mark' in py.test.__all__
|
assert 'mark' in py.test.__all__
|
||||||
assert 'mark' in pytest.__all__
|
assert 'mark' in pytest.__all__
|
||||||
|
|
Loading…
Reference in New Issue