2 new commits in pytest:

https://bitbucket.org/hpk42/pytest/commits/8bd7d1c4fef0/
Changeset:   8bd7d1c4fef0
User:        hpk42
Date:        2013-11-22 13:52:53
Summary:     Backed out changeset 73b1eed8ce09
Affected #:  4 files

diff -r 73b1eed8ce09afd9c4944dda484fdfee6c3a428f -r 
8bd7d1c4fef0d79b067829c18756e5352f9ca60b _pytest/assertion/__init__.py
--- a/_pytest/assertion/__init__.py
+++ b/_pytest/assertion/__init__.py
@@ -78,12 +78,10 @@
 
         for new_expl in hook_result:
             if new_expl:
-                # Don't include pageloads of data unless we
-                # are very verbose (-vv)
+                # Don't include pageloads of data unless we are very verbose 
(-vv)
                 if len(''.join(new_expl[1:])) > 80*8 and 
item.config.option.verbose < 2:
                     new_expl[1:] = ['Detailed information truncated, use "-vv" 
to see']
-                res = '\n'.join(new_expl)
-                print res
+                res = '\n~'.join(new_expl)
                 if item.config.getvalue("assertmode") == "rewrite":
                     # The result will be fed back a python % formatting
                     # operation, which will fail if there are extraneous

diff -r 73b1eed8ce09afd9c4944dda484fdfee6c3a428f -r 
8bd7d1c4fef0d79b067829c18756e5352f9ca60b _pytest/assertion/util.py
--- a/_pytest/assertion/util.py
+++ b/_pytest/assertion/util.py
@@ -95,6 +95,9 @@
 def assertrepr_compare(config, op, left, right):
     """Return specialised explanations for some operators/operands"""
     width = 80 - 15 - len(op) - 2  # 15 chars indentation, 1 space around op
+    left_repr = py.io.saferepr(left, maxsize=int(width/2))
+    right_repr = py.io.saferepr(right, maxsize=width-len(left_repr))
+    summary = '%s %s %s' % (left_repr, op, right_repr)
 
     issequence = lambda x: (isinstance(x, (list, tuple, Sequence))
                             and not isinstance(x, basestring))
@@ -117,7 +120,9 @@
         elif op == 'not in':
             if istext(left) and istext(right):
                 explanation = _notin_text(left, right, verbose)
-    except Exception:
+    except py.builtin._sysex:
+        raise
+    except:
         excinfo = py.code.ExceptionInfo()
         explanation = [
             '(pytest_assertion plugin: representation of details failed.  '
@@ -125,15 +130,7 @@
 
     if not explanation:
         return None
-    if istext(left):
-        left_repr = left[:int(width/2)]
-    else:
-        left_repr = py.io.saferepr(left, maxsize=int(width/2))
-    if istext(right):
-        right_repr = right[:int(width/2)]
-    else:
-        right_repr = py.io.saferepr(right, maxsize=width-len(left_repr))
-    summary = '%s %s %s' % (left_repr, op, right_repr)
+
     return [summary] + explanation
 
 

diff -r 73b1eed8ce09afd9c4944dda484fdfee6c3a428f -r 
8bd7d1c4fef0d79b067829c18756e5352f9ca60b doc/en/customize.txt
--- a/doc/en/customize.txt
+++ b/doc/en/customize.txt
@@ -121,8 +121,6 @@
 .. confval:: python_functions
 
    One or more name prefixes determining which test functions
-   and methods are considered as test modules.  Note that this
-   has no effect on methods that live on a ``unittest.TestCase`` 
-   derived class.
+   and methods are considered as test modules.
 
    See :ref:`change naming conventions` for examples.

diff -r 73b1eed8ce09afd9c4944dda484fdfee6c3a428f -r 
8bd7d1c4fef0d79b067829c18756e5352f9ca60b doc/en/example/pythoncollection.txt
--- a/doc/en/example/pythoncollection.txt
+++ b/doc/en/example/pythoncollection.txt
@@ -53,12 +53,6 @@
     
     =============================  in 0.01 seconds 
=============================
 
-.. note::
-   
-   the ``python_functions`` and ``python_classes`` has no effect
-   for ``unittest.TestCase`` test discovery because pytest delegates
-   detection of test case methods to unittest code.
-
 Interpreting cmdline arguments as Python packages
 -----------------------------------------------------
 


https://bitbucket.org/hpk42/pytest/commits/09aa69307b21/
Changeset:   09aa69307b21
User:        hpk42
Date:        2013-11-22 13:53:43
Summary:     apply doc changes from just backed out changeset
Affected #:  2 files

diff -r 8bd7d1c4fef0d79b067829c18756e5352f9ca60b -r 
09aa69307b2120b2c90ca3a9a3f954668e483589 doc/en/customize.txt
--- a/doc/en/customize.txt
+++ b/doc/en/customize.txt
@@ -121,6 +121,8 @@
 .. confval:: python_functions
 
    One or more name prefixes determining which test functions
-   and methods are considered as test modules.
+   and methods are considered as test modules.  Note that this
+   has no effect on methods that live on a ``unittest.TestCase`` 
+   derived class.
 
    See :ref:`change naming conventions` for examples.

diff -r 8bd7d1c4fef0d79b067829c18756e5352f9ca60b -r 
09aa69307b2120b2c90ca3a9a3f954668e483589 doc/en/example/pythoncollection.txt
--- a/doc/en/example/pythoncollection.txt
+++ b/doc/en/example/pythoncollection.txt
@@ -53,6 +53,12 @@
     
     =============================  in 0.01 seconds 
=============================
 
+.. note::
+   
+   the ``python_functions`` and ``python_classes`` has no effect
+   for ``unittest.TestCase`` test discovery because pytest delegates
+   detection of test case methods to unittest code.
+
 Interpreting cmdline arguments as Python packages
 -----------------------------------------------------

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.
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to