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