lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1377349 - in /lucene/pylucene/branches/pylucene_3_6/test: test_ICUFoldingFilter.py test_ICUTransformFilter.py
Date Sat, 25 Aug 2012 20:29:37 GMT
Author: vajda
Date: Sat Aug 25 20:29:37 2012
New Revision: 1377349

URL: http://svn.apache.org/viewvc?rev=1377349&view=rev
Log:
added ICU_VERSION check for tests depending on resources

Modified:
    lucene/pylucene/branches/pylucene_3_6/test/test_ICUFoldingFilter.py
    lucene/pylucene/branches/pylucene_3_6/test/test_ICUTransformFilter.py

Modified: lucene/pylucene/branches/pylucene_3_6/test/test_ICUFoldingFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_3_6/test/test_ICUFoldingFilter.py?rev=1377349&r1=1377348&r2=1377349&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_3_6/test/test_ICUFoldingFilter.py (original)
+++ lucene/pylucene/branches/pylucene_3_6/test/test_ICUFoldingFilter.py Sat Aug 25 20:29:37
2012
@@ -79,13 +79,16 @@ if __name__ == "__main__":
     except ImportError:
         pass
     else:
-        lucene.initVM()
-        if '-loop' in sys.argv:
-            sys.argv.remove('-loop')
-            while True:
-                try:
-                    main()
-                except:
-                    pass
+        if icu.ICU_VERSION < '49':
+            lucene.initVM()
+            if '-loop' in sys.argv:
+                sys.argv.remove('-loop')
+                while True:
+                    try:
+                        main()
+                    except:
+                        pass
+            else:
+                 main()
         else:
-             main()
+            print >>sys.stderr, "ICU version < 49 is required, running:", icu.ICU_VERSION

Modified: lucene/pylucene/branches/pylucene_3_6/test/test_ICUTransformFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_3_6/test/test_ICUTransformFilter.py?rev=1377349&r1=1377348&r2=1377349&view=diff
==============================================================================
--- lucene/pylucene/branches/pylucene_3_6/test/test_ICUTransformFilter.py (original)
+++ lucene/pylucene/branches/pylucene_3_6/test/test_ICUTransformFilter.py Sat Aug 25 20:29:37
2012
@@ -80,13 +80,16 @@ if __name__ == "__main__":
     except ImportError:
         pass
     else:
-        lucene.initVM()
-        if '-loop' in sys.argv:
-            sys.argv.remove('-loop')
-            while True:
-                try:
-                    main()
-                except:
-                    pass
+        if icu.ICU_VERSION < '49':
+            lucene.initVM()
+            if '-loop' in sys.argv:
+                sys.argv.remove('-loop')
+                while True:
+                    try:
+                        main()
+                    except:
+                        pass
+            else:
+                 main()
         else:
-             main()
+            print >>sys.stderr, "ICU version < 49 is required, running:", icu.ICU_VERSION



Mime
View raw message