Ticket #9958: 9958_exceptions.patch

File 9958_exceptions.patch, 10.3 KB (added by jdemeyer, 9 years ago)
  • sage/categories/enumerated_sets.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1325776286 -3600
    # Node ID 127fbc909ecb5efb878fb87d4b6386e84ada463d
    # Parent  45cabe1f62fbe326ac462ac826a812ef461ec63c
    Fix exception wording for Python-2.7
    
    diff --git a/sage/categories/enumerated_sets.py b/sage/categories/enumerated_sets.py
    a b  
    574574                sage: CC._test_enumerated_set_contains()
    575575                Traceback (most recent call last):
    576576                ...
    577                 AssertionError
     577                AssertionError: False is not true
    578578            """
    579579            tester = self._tester(**options)
    580580            i = 0
  • sage/categories/finite_crystals.py

    diff --git a/sage/categories/finite_crystals.py b/sage/categories/finite_crystals.py
    a b  
    111111                sage: B._test_stembridge_local_axioms()
    112112                Traceback (most recent call last):
    113113                ...
    114                 AssertionError
     114                AssertionError: None
    115115            """
    116116            tester = self._tester(**options)
    117117            goodness=True
  • sage/categories/primer.py

    diff --git a/sage/categories/primer.py b/sage/categories/primer.py
    a b  
    506506      File ".../sage/categories/semigroups.py", line ..., in _test_associativity
    507507        tester.assert_((x * y) * z == x * (y * z))
    508508      ...
    509     AssertionError
     509    AssertionError: False is not true
    510510
    511511
    512512Wrapup:
  • sage/libs/cremona/newforms.pyx

    diff --git a/sage/libs/cremona/newforms.pyx b/sage/libs/cremona/newforms.pyx
    a b  
    5151            sage: from sage.libs.cremona.newforms import ECModularSymbol
    5252            sage: E = EllipticCurve('858k2')
    5353            sage: ECModularSymbol(E)
    54             Traceback (most recent call last):                     # 32-bit
    55             ...                                                    # 32-bit
    56             OverflowError: long int too large to convert to int    # 32-bit
     54            Traceback (most recent call last):                           # 32-bit
     55            ...                                                          # 32-bit
     56            OverflowError: Python int too large to convert to C long     # 32-bit
    5757            Modular symbol with sign 1 over Rational Field attached to Elliptic Curve defined by y^2 + x*y = x^3 + 16353089*x - 335543012233 over Rational Field         # 64-bit
    5858        """
    5959        cdef ZZ_c a1, a2, a3, a4, a6, N
  • sage/matrix/matrix_double_dense.pyx

    diff --git a/sage/matrix/matrix_double_dense.pyx b/sage/matrix/matrix_double_dense.pyx
    a b  
    10461046            sage: A.singular_values(eps='junk')
    10471047            Traceback (most recent call last):
    10481048            ...
    1049             ValueError: invalid literal for float(): junk
     1049            ValueError: could not convert string to float: junk
    10501050
    10511051        REFERENCES:
    10521052
  • sage/misc/sage_unittest.py

    diff --git a/sage/misc/sage_unittest.py b/sage/misc/sage_unittest.py
    a b  
    201201            Failure in _test_b:
    202202            Traceback (most recent call last):
    203203              ...
    204             AssertionError
     204            AssertionError: None
    205205            ------------------------------------------------------------
    206206            Failure in _test_d:
    207207            Traceback (most recent call last):
    208208              ...
    209             AssertionError
     209            AssertionError: None
    210210            ------------------------------------------------------------
    211211            Failure in _test_pickling:
    212212            Traceback (most recent call last):
     
    220220            running ._test_b() . . . fail
    221221            Traceback (most recent call last):
    222222              ...
    223             AssertionError
     223            AssertionError: None
    224224            ------------------------------------------------------------
    225225            running ._test_c() . . . pass
    226226            running ._test_category() . . . pass
    227227            running ._test_d() . . . fail
    228228            Traceback (most recent call last):
    229229              ...
    230             AssertionError
     230            AssertionError: None
    231231            ------------------------------------------------------------
    232232            running ._test_not_implemented_methods() . . . pass
    233233            running ._test_pickling() . . . fail
     
    249249              File ..., in _test_b
    250250                def _test_b(self, tester): tester.fail()
    251251              ...
    252             AssertionError
     252            AssertionError: None
    253253
    254254        In conjonction with ``%pdb on``, this allows for the debbuger
    255255        to jump directly to the first failure location.
     
    311311        sage: tester.assert_(1 == 0)
    312312        Traceback (most recent call last):
    313313        ...
    314         AssertionError
     314        AssertionError: False is not true
    315315        sage: tester.assert_(1 == 0, "this is expected to fail")
    316316        Traceback (most recent call last):
    317317        ...
  • sage/plot/colors.py

    diff --git a/sage/plot/colors.py b/sage/plot/colors.py
    a b  
    627627            sage: Color('black') / 0.0
    628628            Traceback (most recent call last):
    629629            ...
    630             ZeroDivisionError: float division
     630            ZeroDivisionError: float division by zero
    631631            sage: papayawhip / yellow
    632632            Traceback (most recent call last):
    633633            ...
  • sage/rings/polynomial/polynomial_rational_flint.pyx

    diff --git a/sage/rings/polynomial/polynomial_rational_flint.pyx b/sage/rings/polynomial/polynomial_rational_flint.pyx
    a b  
    10321032            sage: (1 + t)^(2^63)
    10331033            Traceback (most recent call last):
    10341034            ...
    1035             OverflowError: long int too large to convert to int
     1035            OverflowError: Python int too large to convert to C long
    10361036        """
    10371037        cdef long n
    10381038        cdef Polynomial_rational_flint res
  • sage/rings/real_mpfr.pyx

    diff --git a/sage/rings/real_mpfr.pyx b/sage/rings/real_mpfr.pyx
    a b  
    195195        sage: R = RealField(2147483648)
    196196        Traceback (most recent call last):
    197197        ...
    198         OverflowError: ... too large to convert to int
     198        OverflowError: ... too large to convert to C long   # 32-bit
     199        OverflowError: ... too large to convert to int      # 64-bit
    199200    """
    200201    global MY_MPFR_PREC_MAX
    201202    # We use 2^31-1 as the largest precision, since 2^31 is not representable
     
    51635164            sage: f(2^75)
    51645165            Traceback (most recent call last):
    51655166            ...
    5166             OverflowError: long int too large to convert to int
     5167            OverflowError: Python int too large to convert to C long
    51675168       
    51685169        ::
    51695170       
  • sage/sets/finite_set_map_cy.pyx

    diff --git a/sage/sets/finite_set_map_cy.pyx b/sage/sets/finite_set_map_cy.pyx
    a b  
    491491            ...       fs3.setimage("z", 2)
    492492            Traceback (most recent call last):
    493493            ...
    494             ValueError: list.index(x): x not in list
     494            ValueError: 'z' is not in list
    495495
    496496            sage: with fs.clone() as fs3:
    497497            ...       fs3.setimage(1, 4)
    498498            Traceback (most recent call last):
    499499            ...
    500             ValueError: list.index(x): x not in list
     500            ValueError: 1 is not in list
    501501        """
    502502        parent = self._parent
    503503        return self._setitem(parent._rank_domain(i), parent._rank_codomain(j))
  • sage/stats/intlist.pyx

    diff --git a/sage/stats/intlist.pyx b/sage/stats/intlist.pyx
    a b  
    7373            sage: stats.IntList([1, 3, 2^32])
    7474            Traceback (most recent call last):
    7575            ...
    76             OverflowError: ... too large to convert to int
     76            OverflowError: ... too large to convert to C long  # 32-bit
     77            OverflowError: ... too large to convert to int     # 64-bit
    7778       
    7879        Printing omits entries::
    7980       
  • sage/structure/list_clone.pyx

    diff --git a/sage/structure/list_clone.pyx b/sage/structure/list_clone.pyx
    a b  
    728728            sage: c.index(5)
    729729            Traceback (most recent call last):
    730730            ...
    731             ValueError: list.index(x): x not in list
     731            ValueError: 5 is not in list
    732732        """
    733733        if start is None:
    734734            return self._list.index(x)
  • sage/structure/sage_object.pyx

    diff --git a/sage/structure/sage_object.pyx b/sage/structure/sage_object.pyx
    a b  
    273273            sage: CC._test_category()
    274274            Traceback (most recent call last):
    275275            ...
    276             AssertionError
     276            AssertionError: False is not true
    277277        """
    278278        from sage.categories.category import Category
    279279        from sage.categories.objects import Objects
     
    312312            sage: tester.assert_(1 == 0)
    313313            Traceback (most recent call last):
    314314            ...
    315             AssertionError
     315            AssertionError: False is not true
    316316            sage: tester.assert_(1 == 0, "this is expected to fail")
    317317            Traceback (most recent call last):
    318318            ...
  • sage/symbolic/callable.py

    diff --git a/sage/symbolic/callable.py b/sage/symbolic/callable.py
    a b  
    3838    sage: f(1)=2
    3939    Traceback (most recent call last):
    4040    ...
    41     SyntaxError: can't assign to function call ...
     41    SyntaxError: can't assign to function call
    4242
    4343    sage: f(x,1)=2
    4444    Traceback (most recent call last):
    4545    ...
    46     SyntaxError: can't assign to function call ...
     46    SyntaxError: can't assign to function call
    4747
    4848    sage: f(1,2)=3
    4949    Traceback (most recent call last):
    5050    ...
    51     SyntaxError: can't assign to function call ...
     51    SyntaxError: can't assign to function call
    5252
    5353    sage: f(1,2)=x
    5454    Traceback (most recent call last):
    5555    ...
    56     SyntaxError: can't assign to function call ...
     56    SyntaxError: can't assign to function call
    5757
    5858    sage: f(x,2)=x
    5959    Traceback (most recent call last):
    6060    ...
    61     SyntaxError: can't assign to function call ...
     61    SyntaxError: can't assign to function call
    6262"""
    6363
    6464from sage.symbolic.ring import SymbolicRing, SR, ParentWithBase