[py-svn] r56894 - py/branch/event/py/test2/rep/testing

hpk at codespeak.net hpk at codespeak.net
Fri Aug 1 14:05:21 CEST 2008


Author: hpk
Date: Fri Aug  1 14:05:20 2008
New Revision: 56894

Modified:
   py/branch/event/py/test2/rep/testing/test_basereporter.py
Log:
sketch test for skip reasons, fix syntax errro


Modified: py/branch/event/py/test2/rep/testing/test_basereporter.py
==============================================================================
--- py/branch/event/py/test2/rep/testing/test_basereporter.py	(original)
+++ py/branch/event/py/test2/rep/testing/test_basereporter.py	Fri Aug  1 14:05:20 2008
@@ -111,7 +111,17 @@
         assert l == [ev1]
 
     def test_skip_reasons(self):
-        
-        
-        
+        py.test.skip("unify ItemTestReport and CollectionReport first")
+        rep = BaseReporter()
+        reprpath = ('xyz', 3, None)
+        reprun = 'hello' # see XXX
+        ev1 = repevent.CollectionReport(None, "skipped", reprrun, reprpath)
+        ev2 = repevent.ItemTestReport(None, "skipped", reprrun, reprpath)
+        l = rep._folded_skips()
+        assert len(l) == 1
+        num, loc, skip_reason = l[0]
+        assert num == 2
+        assert loc == repr_path[:2]
+        # XXX how to assert about the reason? 
+        #assert skip_reason == reprrun? 
 



More information about the pytest-commit mailing list