X-Git-Url: https://git.mdrn.pl/pylucene.git/blobdiff_plain/a2e61f0c04805cfcb8706176758d1283c7e3a55c..aaeed5504b982cf3545252ab528713250aa33eed:/test/test_ThaiAnalyzer.py diff --git a/test/test_ThaiAnalyzer.py b/test/test_ThaiAnalyzer.py index 70dfffd..d6ba26b 100644 --- a/test/test_ThaiAnalyzer.py +++ b/test/test_ThaiAnalyzer.py @@ -94,12 +94,15 @@ class ThaiAnalyzerTestCase(BaseTokenStreamTestCase): 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"