From 67859158d4257095a2a86be71f9474e2d6c0ade1 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 1 Jun 2011 08:03:06 +0200 Subject: [PATCH] fix issue48 - test and fix typo in MarkInfo repr --- CHANGELOG | 1 + _pytest/mark.py | 2 +- testing/test_mark.py | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 0f962316d..b15db9aaa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/_pytest/mark.py b/_pytest/mark.py index d9a45930c..6cc8edcdb 100644 --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -153,7 +153,7 @@ class MarkInfo: def __repr__(self): return "" % ( - self._name, self.args, self.kwargs) + self.name, self.args, self.kwargs) def pytest_itemcollected(item): if not isinstance(item, pytest.Function): diff --git a/testing/test_mark.py b/testing/test_mark.py index 701b03915..495f491ba 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -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__