X-Git-Url: https://git.mdrn.pl/pylucene.git/blobdiff_plain/d6fa7893dc952f8fe6e01d68c9ded2e3f5b3f9de..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"