Hi

The test_Highlighter.py in PyLucene/test calls assertTrue.
Under Python 2.3 this fails:
.
======================================================================
ERROR: testGetBestFragmentsSimpleQuery (__main__.HighlighterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "test_Highlighter.py", line 80, in testGetBestFragmentsSimpleQuery
   self.assertTrue(self.numHighlights == 3,
AttributeError: 'HighlighterTestCase' object has no attribute 'assertTrue'

The patch below uses assertEquals to do the same thing.
This was the only call to assertTrue and the only Error in the whole test set, so I presume its an anomaly


David

Index: test_Highlighter.py
===================================================================
--- test_Highlighter.py (revision 177)
+++ test_Highlighter.py (working copy)
@@ -77,7 +77,7 @@

       self.doSearching("Wicked")
       self.doStandardHighlights()
-       self.assertTrue(self.numHighlights == 3,
+       self.assertEqual(True, self.numHighlights == 3,
                        ("Failed to find correct number of highlights " +
                         str(self.numHighlights) +
                         " found"))

_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to