[pypy-svn] r75554 - in pypy/branch/sys-prefix: lib_pypy lib_pypy/pypy_test pypy/module/test_lib_pypy/ctypes_tests

antocuni at codespeak.net antocuni at codespeak.net
Thu Jun 24 12:05:33 CEST 2010


Author: antocuni
Date: Thu Jun 24 12:05:31 2010
New Revision: 75554

Modified:
   pypy/branch/sys-prefix/lib_pypy/   (props changed)
   pypy/branch/sys-prefix/lib_pypy/datetime.py
   pypy/branch/sys-prefix/lib_pypy/dbm.py   (props changed)
   pypy/branch/sys-prefix/lib_pypy/pypy_test/test_functools.py   (contents, props changed)
   pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/   (props changed)
   pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py
   pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_unicode.py
Log:
merge from trunk

    ------------------------------------------------------------------------
    r75334 | arigo | 2010-06-12 18:58:43 +0200 (Sat, 12 Jun 2010) | 5 lines
    Changed paths:
       M /pypy/trunk/pypy/lib/app_test/ctypes_tests/test_functions.py
       M /pypy/trunk/pypy/lib/app_test/ctypes_tests/test_unicode.py
       M /pypy/trunk/pypy/lib/app_test/test_functools.py
    
    Fix duplicate function names, i.e. places where we had two tests called
    'test_<the same thing>'.  Found using PyFlakes (thanks exarkun for the
    pointer).
    
    
    ------------------------------------------------------------------------
    r75366 | arigo | 2010-06-13 11:18:12 +0200 (Sun, 13 Jun 2010) | 2 lines
    Changed paths:
       M /pypy/trunk/pypy/lib/app_test/ctypes_tests/test_functions.py
    
    Unsure.  I think it's fine to get ArgumentError here.
    
    ------------------------------------------------------------------------
    r75478 | arigo | 2010-06-20 11:27:42 +0200 (Sun, 20 Jun 2010) | 2 lines
    Changed paths:
       M /pypy/trunk/pypy/lib/datetime.py
    
    Typo (thanks Ademan).
    




Modified: pypy/branch/sys-prefix/lib_pypy/datetime.py
==============================================================================
--- pypy/branch/sys-prefix/lib_pypy/datetime.py	(original)
+++ pypy/branch/sys-prefix/lib_pypy/datetime.py	Thu Jun 24 12:05:31 2010
@@ -1524,7 +1524,7 @@
         # Convert self to UTC, and attach the new time zone object.
         myoffset = self.utcoffset()
         if myoffset is None:
-            raise ValuError("astimezone() requires an aware datetime")
+            raise ValueError("astimezone() requires an aware datetime")
         utc = (self - myoffset).replace(tzinfo=tz)
 
         # Convert from UTC to tz's local time.

Modified: pypy/branch/sys-prefix/lib_pypy/pypy_test/test_functools.py
==============================================================================
--- pypy/branch/sys-prefix/lib_pypy/pypy_test/test_functools.py	(original)
+++ pypy/branch/sys-prefix/lib_pypy/pypy_test/test_functools.py	Thu Jun 24 12:05:31 2010
@@ -32,7 +32,7 @@
         p = self.thetype(map, lambda x: x*10)
         assert p([1,2,3,4]) == [10, 20, 30, 40]
 
-    def test_attributes(self):
+    def test_attributes_1(self):
         p = self.thetype(capture, 1, 2, a=10, b=20)
         # attributes should be readable
         assert p.func == capture
@@ -119,7 +119,7 @@
         py.test.raises(ZeroDivisionError, self.thetype(f), 1, 0)
         py.test.raises(ZeroDivisionError, self.thetype(f, y=0), 1)
 
-    def test_attributes(self):
+    def test_attributes_2(self):
         p = self.thetype(hex)
         try:
             del p.__dict__

Modified: pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py
==============================================================================
--- pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py	(original)
+++ pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py	Thu Jun 24 12:05:31 2010
@@ -210,14 +210,14 @@
         result = f(byref(c_int(99)))
         assert not result.contents == 99
 
-    def test_errors(self):
+    def test_errors_1(self):
         f = dll._testfunc_p_p
         f.restype = c_int
 
         class X(Structure):
             _fields_ = [("y", c_int)]
 
-        raises(TypeError, f, X()) #cannot convert parameter
+        raises(ArgumentError, f, X()) #cannot convert parameter
 
     ################################################################
     def test_shorts(self):
@@ -305,7 +305,7 @@
 
         assert 13577625587 == f(1000000000000, cb)
 
-    def test_errors(self):
+    def test_errors_2(self):
         raises(AttributeError, getattr, dll, "_xxx_yyy")
         raises(ValueError, c_int.in_dll, dll, "_xxx_yyy")
 

Modified: pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_unicode.py
==============================================================================
--- pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_unicode.py	(original)
+++ pypy/branch/sys-prefix/pypy/module/test_lib_pypy/ctypes_tests/test_unicode.py	Thu Jun 24 12:05:31 2010
@@ -90,7 +90,7 @@
             assert func(u"abc") == "abc"
             assert func(u"äöüß") == ""
 
-        def test_ascii_replace(self):
+        def test_ascii_replace_2(self):
             ctypes.set_conversion_mode("ascii", "replace")
             assert func("abc") == "abc"
             assert func(u"abc") == "abc"



More information about the Pypy-commit mailing list