[py-svn] r35766 - in py/dist/py/test/rsession: . testing

fijal at codespeak.net fijal at codespeak.net
Thu Dec 14 22:27:04 CET 2006


Author: fijal
Date: Thu Dec 14 22:27:02 2006
New Revision: 35766

Modified:
   py/dist/py/test/rsession/reporter.py
   py/dist/py/test/rsession/testing/test_reporter.py
Log:
Fixed real bug exposed by svntrigger


Modified: py/dist/py/test/rsession/reporter.py
==============================================================================
--- py/dist/py/test/rsession/reporter.py	(original)
+++ py/dist/py/test/rsession/reporter.py	Thu Dec 14 22:27:02 2006
@@ -308,7 +308,7 @@
             d = str(self.pkgdir.dirpath().dirpath())
             if local.startswith(d):
                 local = local[len(d) + 1:]
-            if name.startswith(local):
+            if local and name.startswith(local):
                 name = name[len(local) + 1:]
             self.out.write("\n%s[%d] " % (name, lgt))
     

Modified: py/dist/py/test/rsession/testing/test_reporter.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_reporter.py	(original)
+++ py/dist/py/test/rsession/testing/test_reporter.py	Thu Dec 14 22:27:02 2006
@@ -144,10 +144,12 @@
             self._test_module()
     
     def test_full_module(self):
-        assert self._test_full_module() == """
+        received = self._test_full_module()
+        expected = """
 repmod/test_one.py[1] 
 repmod/test_three.py[0] - FAILED TO LOAD MODULE
 repmod/test_two.py[0] - skipped (reason)"""
+        assert received == expected
 
 class TestRemoteReporter(AbstractTestReporter):
     reporter = RemoteReporter



More information about the pytest-commit mailing list