lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1212170 - /lucene/pylucene/branches/branch_3x/test/test_ThaiAnalyzer.py
Date Thu, 08 Dec 2011 22:21:36 GMT
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"



Mime
View raw message