[Numpy-svn] r6474 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Wed Feb 25 12:56:41 CST 2009


Author: cdavid
Date: 2009-02-25 12:56:15 -0600 (Wed, 25 Feb 2009)
New Revision: 6474

Modified:
   trunk/numpy/core/tests/test_multiarray.py
   trunk/numpy/core/tests/test_regression.py
Log:
Mark mingw-w64 crashing tests as known failures.

Modified: trunk/numpy/core/tests/test_multiarray.py
===================================================================
--- trunk/numpy/core/tests/test_multiarray.py	2009-02-25 18:27:19 UTC (rev 6473)
+++ trunk/numpy/core/tests/test_multiarray.py	2009-02-25 18:56:15 UTC (rev 6474)
@@ -7,6 +7,10 @@
 
 from test_print import in_foreign_locale
 
+def iswin64():
+    import platform
+    return platform.architecture()[0] == "64bit" and sys.platform == "win32"
+
 class TestFlags(TestCase):
     def setUp(self):
         self.a = arange(10)
@@ -556,6 +560,7 @@
 
 
 class TestStringCompare(TestCase):
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_string(self):
         g1 = array(["This","is","example"])
         g2 = array(["This","was","example"])
@@ -566,6 +571,7 @@
         assert_array_equal(g1 < g2, [g1[i] < g2[i] for i in [0,1,2]])
         assert_array_equal(g1 > g2, [g1[i] > g2[i] for i in [0,1,2]])
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_mixed(self):
         g1 = array(["spam","spa","spammer","and eggs"])
         g2 = "spam"
@@ -577,6 +583,7 @@
         assert_array_equal(g1 >= g2, [x >= g2 for x in g1])
 
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_unicode(self):
         g1 = array([u"This",u"is",u"example"])
         g2 = array([u"This",u"was",u"example"])
@@ -796,6 +803,7 @@
             os.unlink(self.filename)
             #tmp_file.close()
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_roundtrip_file(self):
         f = open(self.filename, 'wb')
         self.x.tofile(f)
@@ -807,11 +815,13 @@
         assert_array_equal(y, self.x.flat)
         os.unlink(self.filename)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_roundtrip_filename(self):
         self.x.tofile(self.filename)
         y = np.fromfile(self.filename, dtype=self.dtype)
         assert_array_equal(y, self.x.flat)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_roundtrip_binary_str(self):
         s = self.x.tostring()
         y = np.fromstring(s, dtype=self.dtype)
@@ -821,6 +831,7 @@
         y = np.fromstring(s, dtype=self.dtype)
         assert_array_equal(y, self.x.flatten('F'))
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_roundtrip_str(self):
         x = self.x.real.ravel()
         s = "@".join(map(str, x))
@@ -830,12 +841,14 @@
         assert_array_equal(x[nan_mask], y[nan_mask])
         assert_array_almost_equal(x[~nan_mask], y[~nan_mask], decimal=5)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_roundtrip_repr(self):
         x = self.x.real.ravel()
         s = "@".join(map(repr, x))
         y = np.fromstring(s, sep="@")
         assert_array_equal(x, y)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def _check_from(self, s, value, **kw):
         y = np.fromstring(s, **kw)
         assert_array_equal(y, value)
@@ -846,53 +859,66 @@
         y = np.fromfile(self.filename, **kw)
         assert_array_equal(y, value)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_nan(self):
         self._check_from("nan +nan -nan NaN nan(foo) +NaN(BAR) -NAN(q_u_u_x_)",
                          [nan, nan, nan, nan, nan, nan, nan],
                          sep=' ')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_inf(self):
         self._check_from("inf +inf -inf infinity -Infinity iNfInItY -inF",
                          [inf, inf, -inf, inf, -inf, inf, -inf], sep=' ')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_numbers(self):
         self._check_from("1.234 -1.234 .3 .3e55 -123133.1231e+133",
                          [1.234, -1.234, .3, .3e55, -123133.1231e+133], sep=' ')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_binary(self):
         self._check_from('\x00\x00\x80?\x00\x00\x00@\x00\x00@@\x00\x00\x80@',
                          array([1,2,3,4]),
                          dtype='<f4')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_string(self):
         self._check_from('1,2,3,4', [1., 2., 3., 4.], sep=',')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_counted_string(self):
         self._check_from('1,2,3,4', [1., 2., 3., 4.], count=4, sep=',')
         self._check_from('1,2,3,4', [1., 2., 3.], count=3, sep=',')
         self._check_from('1,2,3,4', [1., 2., 3., 4.], count=-1, sep=',')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_string_with_ws(self):
         self._check_from('1 2  3     4   ', [1, 2, 3, 4], dtype=int, sep=' ')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_counted_string_with_ws(self):
         self._check_from('1 2  3     4   ', [1,2,3], count=3, dtype=int,
                          sep=' ')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_ascii(self):
         self._check_from('1 , 2 , 3 , 4', [1.,2.,3.,4.], sep=',')
         self._check_from('1,2,3,4', [1.,2.,3.,4.], dtype=float, sep=',')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_malformed(self):
         self._check_from('1.234 1,234', [1.234, 1.], sep=' ')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_long_sep(self):
         self._check_from('1_x_3_x_4_x_5', [1,3,4,5], sep='_x_')
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_dtype(self):
         v = np.array([1,2,3,4], dtype=np.int_)
         self._check_from('1,2,3,4', v, sep=',', dtype=np.int_)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_tofile_sep(self):
         x = np.array([1.51, 2, 3.51, 4], dtype=float)
         f = open(self.filename, 'w')
@@ -904,6 +930,7 @@
         assert_equal(s, '1.51,2.0,3.51,4.0')
         os.unlink(self.filename)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_tofile_format(self):
         x = np.array([1.51, 2, 3.51, 4], dtype=float)
         f = open(self.filename, 'w')
@@ -918,6 +945,7 @@
     def _run_in_foreign_locale(self, func, fail=False):
         np.testing.dec.knownfailureif(fail)(func)(self)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_locale(self):
         yield self._run_in_foreign_locale, TestIO.test_numbers
         yield self._run_in_foreign_locale, TestIO.test_nan

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2009-02-25 18:27:19 UTC (rev 6473)
+++ trunk/numpy/core/tests/test_regression.py	2009-02-25 18:56:15 UTC (rev 6474)
@@ -8,6 +8,10 @@
 
 rlevel = 1
 
+def iswin64():
+    import platform
+    return platform.architecture()[0] == "64bit" and sys.platform == "win32"
+
 def assert_valid_refcount(op):
     a = np.arange(100 * 100)
     b = np.arange(100*100).reshape(100, 100)
@@ -283,6 +287,7 @@
         x[0].tolist()
         [i for i in x[0]]
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_unicode_string_comparison(self,level=rlevel):
         """Ticket #190"""
         a = np.array('hello',np.unicode_)
@@ -753,6 +758,7 @@
             x |= y
         self.failUnlessRaises(TypeError,rs)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_unicode_scalar(self, level=rlevel):
         """Ticket #600"""
         import cPickle
@@ -1164,6 +1170,7 @@
         b = np.array(['1','2','3'])
         assert_equal(a,b)
 
+    @dec.knownfailureif(iswin64(), "Crash on win64")
     def test_unaligned_unicode_access(self, level=rlevel) :
         """Ticket #825"""
         for i in range(1,9) :



More information about the Numpy-svn mailing list