[py-svn] commit/pytest: hpk42: fix issue48 - test and fix typo in MarkInfo repr

Bitbucket commits-noreply at bitbucket.org
Wed Jun 1 08:03:14 CEST 2011


1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/6e3f8d84dfbf/
changeset:   6e3f8d84dfbf
branches:    
user:        hpk42
date:        2011-06-01 08:03:06
summary:     fix issue48 - test and fix typo in MarkInfo repr
affected #:  3 files (193 bytes)

--- a/CHANGELOG	Wed Jun 01 08:00:12 2011 +0200
+++ b/CHANGELOG	Wed Jun 01 08:03:06 2011 +0200
@@ -8,6 +8,7 @@
 - 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)
 


--- a/_pytest/mark.py	Wed Jun 01 08:00:12 2011 +0200
+++ b/_pytest/mark.py	Wed Jun 01 08:03:06 2011 +0200
@@ -153,7 +153,7 @@
 
     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):


--- a/testing/test_mark.py	Wed Jun 01 08:00:12 2011 +0200
+++ b/testing/test_mark.py	Wed Jun 01 08:03:06 2011 +0200
@@ -2,6 +2,11 @@
 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__

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the pytest-commit mailing list