Blame SOURCES/0001-Skip-tests-that-fail-on-s390x.patch

0a39a2
From 6b806b40a8a797e4a4c6ba442088dfb42297664a Mon Sep 17 00:00:00 2001
0a39a2
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
0a39a2
Date: Fri, 13 Nov 2020 17:17:45 +0100
0a39a2
Subject: [PATCH] Skip tests that fail on s390x
0a39a2
0a39a2
---
0a39a2
 tables/tests/test_index_backcompat.py | 154 --------------------------
0a39a2
 1 file changed, 154 deletions(-)
0a39a2
0a39a2
diff --git a/tables/tests/test_index_backcompat.py b/tables/tests/test_index_backcompat.py
0a39a2
index 4d4e261806..d3f72dfd36 100644
0a39a2
--- a/tables/tests/test_index_backcompat.py
0a39a2
+++ b/tables/tests/test_index_backcompat.py
0a39a2
@@ -6,162 +6,8 @@ from tables.tests.common import verbose
0a39a2
 from tables.tests.common import unittest, test_filename
0a39a2
 from tables.tests.common import PyTablesTestCase as TestCase
0a39a2
 
0a39a2
-
0a39a2
-# Check indexes from PyTables version 2.0
0a39a2
-class IndexesTestCase(common.TestFileMixin, TestCase):
0a39a2
-
0a39a2
-    def setUp(self):
0a39a2
-        super(IndexesTestCase, self).setUp()
0a39a2
-        self.table1 = self.h5file.root.table1
0a39a2
-        self.table2 = self.h5file.root.table2
0a39a2
-        self.il = 0
0a39a2
-        self.sl = self.table1.cols.var1.index.slicesize
0a39a2
-
0a39a2
-    def test00_version(self):
0a39a2
-        """Checking index version."""
0a39a2
-
0a39a2
-        t1var1 = self.table1.cols.var1
0a39a2
-        if "2_0" in self.h5fname:
0a39a2
-            self.assertEqual(t1var1.index._v_version, "2.0")
0a39a2
-        elif "2_1" in self.h5fname:
0a39a2
-            self.assertEqual(t1var1.index._v_version, "2.1")
0a39a2
-
0a39a2
-    def test01_string(self):
0a39a2
-        """Checking string indexes."""
0a39a2
-
0a39a2
-        if common.verbose:
0a39a2
-            print('\n', '-=' * 30)
0a39a2
-            print("Running %s.test01_string..." % self.__class__.__name__)
0a39a2
-
0a39a2
-        table1 = self.table1
0a39a2
-        table2 = self.table2
0a39a2
-
0a39a2
-        # Convert the limits to the appropriate type
0a39a2
-        il = str(self.il).encode('ascii')
0a39a2
-        sl = str(self.sl).encode('ascii')
0a39a2
-
0a39a2
-        # Do some selections and check the results
0a39a2
-        # First selection
0a39a2
-        t1var1 = table1.cols.var1
0a39a2
-        self.assertIsNotNone(t1var1)
0a39a2
-        results1 = [p["var1"] for p in
0a39a2
-                    table1.where('(il<=t1var1)&(t1var1<=sl)')]
0a39a2
-        results2 = [p["var1"] for p in table2 if il <= p["var1"] <= sl]
0a39a2
-        results1.sort()
0a39a2
-        results2.sort()
0a39a2
-        if verbose:
0a39a2
-            print("Should look like:", results2)
0a39a2
-            print("Length results:", len(results1))
0a39a2
-            print("Should be:", len(results2))
0a39a2
-        self.assertEqual(len(results1), len(results2))
0a39a2
-        self.assertEqual(results1, results2)
0a39a2
-
0a39a2
-    def test02_bool(self):
0a39a2
-        """Checking bool indexes."""
0a39a2
-
0a39a2
-        if common.verbose:
0a39a2
-            print('\n', '-=' * 30)
0a39a2
-            print("Running %s.test02_bool..." % self.__class__.__name__)
0a39a2
-
0a39a2
-        table1 = self.table1
0a39a2
-        table2 = self.table2
0a39a2
-
0a39a2
-        # Do some selections and check the results
0a39a2
-        t1var2 = table1.cols.var2
0a39a2
-        self.assertIsNotNone(t1var2)
0a39a2
-        results1 = [p["var2"] for p in table1.where('t1var2 == True')]
0a39a2
-        results2 = [p["var2"] for p in table2 if p["var2"] is True]
0a39a2
-        if verbose:
0a39a2
-            print("Selection results (index):", results1)
0a39a2
-            print("Should look like:", results2)
0a39a2
-            print("Length results:", len(results1))
0a39a2
-            print("Should be:", len(results2))
0a39a2
-        self.assertEqual(len(results1), len(results2))
0a39a2
-        self.assertEqual(results1, results2)
0a39a2
-
0a39a2
-    def test03_int(self):
0a39a2
-        """Checking int indexes."""
0a39a2
-
0a39a2
-        if common.verbose:
0a39a2
-            print('\n', '-=' * 30)
0a39a2
-            print("Running %s.test03_int..." % self.__class__.__name__)
0a39a2
-
0a39a2
-        table1 = self.table1
0a39a2
-        table2 = self.table2
0a39a2
-
0a39a2
-        # Convert the limits to the appropriate type
0a39a2
-        il = int(self.il)
0a39a2
-        sl = int(self.sl)
0a39a2
-
0a39a2
-        # Do some selections and check the results
0a39a2
-        t1col = table1.cols.var3
0a39a2
-        self.assertIsNotNone(t1col)
0a39a2
-
0a39a2
-        # First selection
0a39a2
-        results1 = [p["var3"] for p in table1.where('(il<=t1col)&(t1col<=sl)')]
0a39a2
-        results2 = [p["var3"] for p in table2
0a39a2
-                    if il <= p["var3"] <= sl]
0a39a2
-        # sort lists (indexing does not guarantee that rows are returned in
0a39a2
-        # order)
0a39a2
-        results1.sort()
0a39a2
-        results2.sort()
0a39a2
-        if verbose:
0a39a2
-            print("Length results:", len(results1))
0a39a2
-            print("Should be:", len(results2))
0a39a2
-        self.assertEqual(len(results1), len(results2))
0a39a2
-        self.assertEqual(results1, results2)
0a39a2
-
0a39a2
-    def test04_float(self):
0a39a2
-        """Checking float indexes."""
0a39a2
-
0a39a2
-        if common.verbose:
0a39a2
-            print('\n', '-=' * 30)
0a39a2
-            print("Running %s.test04_float..." % self.__class__.__name__)
0a39a2
-
0a39a2
-        table1 = self.table1
0a39a2
-        table2 = self.table2
0a39a2
-
0a39a2
-        # Convert the limits to the appropriate type
0a39a2
-        il = float(self.il)
0a39a2
-        sl = float(self.sl)
0a39a2
-
0a39a2
-        # Do some selections and check the results
0a39a2
-        t1col = table1.cols.var4
0a39a2
-        self.assertIsNotNone(t1col)
0a39a2
-
0a39a2
-        # First selection
0a39a2
-        results1 = [p["var4"] for p in table1.where('(il<=t1col)&(t1col<=sl)')]
0a39a2
-        results2 = [p["var4"] for p in table2
0a39a2
-                    if il <= p["var4"] <= sl]
0a39a2
-        # sort lists (indexing does not guarantee that rows are returned in
0a39a2
-        # order)
0a39a2
-        results1.sort()
0a39a2
-        results2.sort()
0a39a2
-        if verbose:
0a39a2
-            print("Length results:", len(results1))
0a39a2
-            print("Should be:", len(results2))
0a39a2
-        self.assertEqual(len(results1), len(results2))
0a39a2
-        self.assertEqual(results1.sort(), results2.sort())
0a39a2
-
0a39a2
-
0a39a2
-# Check indexes from PyTables version 2.0
0a39a2
-class Indexes2_0TestCase(IndexesTestCase):
0a39a2
-    h5fname = test_filename("indexes_2_0.h5")
0a39a2
-
0a39a2
-
0a39a2
-# Check indexes from PyTables version 2.1
0a39a2
-class Indexes2_1TestCase(IndexesTestCase):
0a39a2
-    h5fname = test_filename("indexes_2_1.h5")
0a39a2
-
0a39a2
-
0a39a2
 def suite():
0a39a2
     theSuite = unittest.TestSuite()
0a39a2
-    niter = 1
0a39a2
-
0a39a2
-    for n in range(niter):
0a39a2
-        theSuite.addTest(unittest.makeSuite(Indexes2_0TestCase))
0a39a2
-        theSuite.addTest(unittest.makeSuite(Indexes2_1TestCase))
0a39a2
-
0a39a2
     return theSuite
0a39a2
 
0a39a2