Commit 8cd374c3 authored by Hanno Schlichting's avatar Hanno Schlichting

Move test helper classes to the top of the module, more meaningful name for TestRS

parent 57b1615f
...@@ -55,6 +55,39 @@ def sort(iterable): ...@@ -55,6 +55,39 @@ def sort(iterable):
return L return L
class zdummy(ExtensionClass.Base):
def __init__(self, num):
self.num = num
def title(self):
return '%d' % self.num
class dummy(ExtensionClass.Base):
att1 = 'att1'
att2 = 'att2'
att3 = ['att3']
def __init__(self, num):
self.num = num
def col1(self):
return 'col1'
def col2(self):
return 'col2'
def col3(self):
return ['col3']
class objRS(ExtensionClass.Base):
def __init__(self, num):
self.number = num
class CatalogBase: class CatalogBase:
def setUp(self): def setUp(self):
...@@ -129,33 +162,6 @@ class TestAddDelIndexes(CatalogBase, unittest.TestCase): ...@@ -129,33 +162,6 @@ class TestAddDelIndexes(CatalogBase, unittest.TestCase):
'del index failed') 'del index failed')
class zdummy(ExtensionClass.Base):
def __init__(self, num):
self.num = num
def title(self):
return '%d' % self.num
class dummy(ExtensionClass.Base):
att1 = 'att1'
att2 = 'att2'
att3 = ['att3']
def __init__(self, num):
self.num = num
def col1(self):
return 'col1'
def col2(self):
return 'col2'
def col3(self):
return ['col3']
class TestCatalogObject(unittest.TestCase): class TestCatalogObject(unittest.TestCase):
upper = 1000 upper = 1000
...@@ -391,13 +397,7 @@ class TestCatalogObject(unittest.TestCase): ...@@ -391,13 +397,7 @@ class TestCatalogObject(unittest.TestCase):
self.assertEqual(brain.att1, 'foobar') self.assertEqual(brain.att1, 'foobar')
class objRS(ExtensionClass.Base): class TestRangeSearch(unittest.TestCase):
def __init__(self, num):
self.number = num
class TestRS(unittest.TestCase):
def setUp(self): def setUp(self):
self._catalog = Catalog() self._catalog = Catalog()
...@@ -518,6 +518,6 @@ def test_suite(): ...@@ -518,6 +518,6 @@ def test_suite():
suite.addTest(unittest.makeSuite(TestAddDelColumn)) suite.addTest(unittest.makeSuite(TestAddDelColumn))
suite.addTest(unittest.makeSuite(TestAddDelIndexes)) suite.addTest(unittest.makeSuite(TestAddDelIndexes))
suite.addTest(unittest.makeSuite(TestCatalogObject)) suite.addTest(unittest.makeSuite(TestCatalogObject))
suite.addTest(unittest.makeSuite(TestRS)) suite.addTest(unittest.makeSuite(TestRangeSearch))
suite.addTest(unittest.makeSuite(TestMerge)) suite.addTest(unittest.makeSuite(TestMerge))
return suite return suite
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment