2 new changesets in pytest:

http://bitbucket.org/hpk42/pytest/changeset/dabda93214ff/
changeset:   r2173:dabda93214ff
user:        RonnyPfannschmidt
date:        2011-03-05 17:49:51
summary:     unittest plugin: prune __unittest marked modules from traces
affected #:  2 files (527 bytes)

--- a/_pytest/unittest.py       Sat Mar 05 14:59:06 2011 +0100
+++ b/_pytest/unittest.py       Sat Mar 05 17:49:51 2011 +0100
@@ -102,6 +102,10 @@
     def runtest(self):
         self._testcase(result=self)
 
+    def _prunetraceback(self, excinfo):
+        pytest.Function._prunetraceback(self, excinfo)
+        excinfo.traceback = excinfo.traceback.filter(lambda x:not 
x.frame.f_globals.get('__unittest'))
+
 @pytest.mark.tryfirst
 def pytest_runtest_makereport(item, call):
     if isinstance(item, TestCaseFunction):


--- a/testing/test_unittest.py  Sat Mar 05 14:59:06 2011 +0100
+++ b/testing/test_unittest.py  Sat Mar 05 17:49:51 2011 +0100
@@ -396,3 +396,15 @@
         "*tearDown()*",
         "*_post_teardown()*",
     ])
+
+
+def test_unittest_not_shown_in_traceback(testdir):
+    testdir.makepyfile("""
+        import unittest
+        class t(unittest.TestCase):
+            def test_hello(self):
+                x = 3
+                self.assertEquals(x, 4)
+    """)
+    res = testdir.runpytest()
+    assert "failUnlessEqual" not in res.stdout.str()


http://bitbucket.org/hpk42/pytest/changeset/3d6a55da94de/
changeset:   r2174:3d6a55da94de
user:        hpk42
date:        2011-03-05 18:22:33
summary:     add changelog entry about unittest change, bump version
affected #:  3 files (73 bytes)

--- a/CHANGELOG Sat Mar 05 17:49:51 2011 +0100
+++ b/CHANGELOG Sat Mar 05 18:22:33 2011 +0100
@@ -34,6 +34,8 @@
 
 - more precise (avoiding of) deprecation warnings for node.Class|Function 
accesses
 
+- avoid std unittest assertion helper code in tracebacks (thanks Ronny)
+
 Changes between 2.0.0 and 2.0.1
 ----------------------------------------------
 


--- a/pytest.py Sat Mar 05 17:49:51 2011 +0100
+++ b/pytest.py Sat Mar 05 18:22:33 2011 +0100
@@ -1,7 +1,7 @@
 """
 unit and functional testing with Python.
 """
-__version__ = '2.0.2.dev3'
+__version__ = '2.0.2.dev4'
 __all__ = ['main']
 
 from _pytest.core import main, UsageError, _preloadplugins


--- a/setup.py  Sat Mar 05 17:49:51 2011 +0100
+++ b/setup.py  Sat Mar 05 18:22:33 2011 +0100
@@ -22,7 +22,7 @@
         name='pytest',
         description='py.test: simple powerful testing with Python',
         long_description = long_description,
-        version='2.0.2.dev3',
+        version='2.0.2.dev4',
         url='http://pytest.org',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],

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.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to