You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-commits@lucene.apache.org by va...@apache.org on 2011/12/08 23:21:36 UTC
svn commit: r1212170 -
/lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py
Author: vajda
Date: Thu Dec 8 22:21:36 2011
New Revision: 1212170
URL: http://svn.apache.org/viewvc?rev=1212170&view=rev
Log:
added check for Thai availability before running test
Modified:
lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py
Modified: lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py?rev=1212170&r1=1212169&r2=1212170&view=diff
==============================================================================
--- lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py (original)
+++ lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py Thu Dec 8 22:21:36 2011
@@ -94,12 +94,15 @@ class ThaiAnalyzerTestCase(BaseTokenStre
if __name__ == "__main__":
import sys, lucene
lucene.initVM()
- if '-loop' in sys.argv:
- sys.argv.remove('-loop')
- while True:
- try:
- main()
- except:
- pass
+ if ThaiWordFilter.DBBI_AVAILABLE:
+ if '-loop' in sys.argv:
+ sys.argv.remove('-loop')
+ while True:
+ try:
+ main()
+ except:
+ pass
+ else:
+ main()
else:
- main()
+ print >>sys.stderr, "Thai not supported by this JVM, tests skipped"