Skip to content

Commit

Permalink
clarify test names
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Mar 25, 2012
1 parent 76ddd31 commit bb2d5e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Products/ZCatalog/tests/test_catalog.py
Expand Up @@ -465,35 +465,35 @@ def testKeywordIndexLength(self):
self.assertEqual(len(a), self.upper,
'should be %s, but is %s' % (self.upper, len(a)))

def testGoodSortIndex(self):
def test_sort_on_good_index(self):
upper = self.upper
a = self._catalog(att1='att1', sort_on='num')
self.assertEqual(len(a), upper,
'length should be %s, its %s' % (upper, len(a)))
for x in range(self.upper):
self.assertEqual(a[x].num, x)

def testBadSortIndex(self):
def test_sort_on_bad_index(self):
from Products.ZCatalog.Catalog import CatalogError
def badsortindex():
self._catalog(sort_on='foofaraw')
self.assertRaises(CatalogError, badsortindex)

def testWrongKindOfIndexForSort(self):
def test_sort_on_wrong_index(self):
from Products.ZCatalog.Catalog import CatalogError
def wrongsortindex():
self._catalog(sort_on='att2')
self.assertRaises(CatalogError, wrongsortindex)

def testTextIndexQWithSortOn(self):
def test_sort_on(self):
upper = self.upper
a = self._catalog(sort_on='num', att2='att2')
self.assertEqual(len(a), upper,
'length should be %s, its %s' % (upper, len(a)))
for x in range(self.upper):
self.assertEqual(a[x].num, x)

def testTextIndexQWithoutSortOn(self):
def test_sort_on_missing(self):
upper = self.upper
a = self._catalog(att2='att2')
self.assertEqual(len(a), upper,
Expand Down

0 comments on commit bb2d5e3

Please sign in to comment.