Thanks for the patch and bug report. I didn't know TestCase.assertTrue had been added to unittest.TestCase. I've been using TestCase.assert_ instead in all the Lucene unit tests I ported but I missed this one.
Andi..
On Thu, 10 Feb 2005, David Fraser wrote:
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
_______________________________________________ pylucene-dev mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
