[py-svn] r56284 - in py/trunk/py: . test/testing

hpk at codespeak.net hpk at codespeak.net
Fri Jul 4 08:51:54 CEST 2008


Author: hpk
Date: Fri Jul  4 08:51:51 2008
New Revision: 56284

Modified:
   py/trunk/py/__init__.py
   py/trunk/py/test/testing/test_session.py
Log:
removing unadvertised new names and adjusting the test 
to show how you can put custom messages otherwise. 



Modified: py/trunk/py/__init__.py
==============================================================================
--- py/trunk/py/__init__.py	(original)
+++ py/trunk/py/__init__.py	Fri Jul  4 08:51:51 2008
@@ -31,8 +31,6 @@
     'test.skip'              : ('./test/item.py', 'skip'),
     'test.fail'              : ('./test/item.py', 'fail'),
     'test.exit'              : ('./test/session.py', 'exit'),
-    'test.broken'            : ('./test/item.py', 'Broken'),
-    'test.notimplemented'    : ('./test/item.py', '_NotImplemented'),
     'test.pdb'               : ('./test/custompdb.py', 'set_trace'),
 
     # configuration/initialization related test api

Modified: py/trunk/py/test/testing/test_session.py
==============================================================================
--- py/trunk/py/test/testing/test_session.py	(original)
+++ py/trunk/py/test/testing/test_session.py	Fri Jul  4 08:51:51 2008
@@ -282,10 +282,10 @@
     tmp.ensure("test_one.py").write(py.code.Source("""
         import py
         def test_1():
-            py.test.skip(py.test.broken('stuff'))
+            py.test.skip("Broken: stuff") 
         
         def test_2():
-            py.test.skip(py.test.notimplemented('stuff'))
+            py.test.skip("Not implemented: stuff") 
     """))
     tmp.ensure("__init__.py")
     config = py.test.config._reparse([tmp])
@@ -294,6 +294,6 @@
     session.main(all.append)
     skips = getskipped(all)
     assert len(skips) == 2
-    assert str(skips[0].skipped.value) == 'Broken: stuff'
-    assert str(skips[1].skipped.value) == 'Not implemented: stuff'
+    assert str(skips[0].skipped.value).find('Broken: stuff') != -1
+    assert str(skips[1].skipped.value).find('Not implemented: stuff') != -1
     



More information about the pytest-commit mailing list