lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1427010 - /lucene/pylucene/trunk/test/
Date Sun, 30 Dec 2012 22:48:58 GMT
Author: vajda
Date: Sun Dec 30 22:48:58 2012
New Revision: 1427010

URL: http://svn.apache.org/viewvc?rev=1427010&view=rev
Log:
cleaned up imports a bit

Modified:
    lucene/pylucene/trunk/test/test_Analyzers.py
    lucene/pylucene/trunk/test/test_Binary.py
    lucene/pylucene/trunk/test/test_BinaryDocument.py
    lucene/pylucene/trunk/test/test_BooleanOr.py
    lucene/pylucene/trunk/test/test_BooleanQuery.py
    lucene/pylucene/trunk/test/test_CachingWrapperFilter.py
    lucene/pylucene/trunk/test/test_Collections.py
    lucene/pylucene/trunk/test/test_DocBoost.py
    lucene/pylucene/trunk/test/test_FilteredQuery.py
    lucene/pylucene/trunk/test/test_Highlighter.py
    lucene/pylucene/trunk/test/test_ICUFoldingFilter.py
    lucene/pylucene/trunk/test/test_ICUNormalizer2Filter.py
    lucene/pylucene/trunk/test/test_ICUTransformFilter.py
    lucene/pylucene/trunk/test/test_IndexDeletionPolicy.py
    lucene/pylucene/trunk/test/test_Not.py
    lucene/pylucene/trunk/test/test_PerFieldAnalyzerWrapper.py
    lucene/pylucene/trunk/test/test_PhraseQuery.py
    lucene/pylucene/trunk/test/test_PositionIncrement.py
    lucene/pylucene/trunk/test/test_PrefixFilter.py
    lucene/pylucene/trunk/test/test_PrefixQuery.py
    lucene/pylucene/trunk/test/test_PyLucene.py
    lucene/pylucene/trunk/test/test_PyLuceneThread.py
    lucene/pylucene/trunk/test/test_PythonDirectory.py
    lucene/pylucene/trunk/test/test_PythonQueryParser.py
    lucene/pylucene/trunk/test/test_RegexQuery.py
    lucene/pylucene/trunk/test/test_TermRangeQuery.py
    lucene/pylucene/trunk/test/test_ThaiAnalyzer.py
    lucene/pylucene/trunk/test/test_bug1564.py
    lucene/pylucene/trunk/test/test_bug1763.py
    lucene/pylucene/trunk/test/test_bug1842.py

Modified: lucene/pylucene/trunk/test/test_Analyzers.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Analyzers.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Analyzers.py (original)
+++ lucene/pylucene/trunk/test/test_Analyzers.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,8 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import main
+import sys, lucene, unittest
+
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 from lucene import JArray
 
@@ -124,14 +125,13 @@ class PayloadSetter(PythonTokenFilter):
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_Binary.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Binary.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Binary.py (original)
+++ lucene/pylucene/trunk/test/test_Binary.py Sun Dec 30 22:48:58 2012
@@ -14,13 +14,13 @@
 
 # test PyLucene binary field
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from lucene import JArray
 
 from org.apache.lucene.document import StoredField
 
 
-class BinaryTestCase(TestCase):
+class BinaryTestCase(unittest.TestCase):
 
     def binary(self, b):
 
@@ -38,14 +38,13 @@ class BinaryTestCase(TestCase):
 
 
 if __name__ == '__main__':
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-        main()
+        unittest.main()

Modified: lucene/pylucene/trunk/test/test_BinaryDocument.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BinaryDocument.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BinaryDocument.py (original)
+++ lucene/pylucene/trunk/test/test_BinaryDocument.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from lucene import JArray
 from PyLuceneTestCase import PyLuceneTestCase
 
@@ -98,14 +98,13 @@ class TestBinaryDocument(PyLuceneTestCas
 
 
 if __name__ == '__main__':
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-        main()
+        unittest.main()

Modified: lucene/pylucene/trunk/test/test_BooleanOr.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BooleanOr.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BooleanOr.py (original)
+++ lucene/pylucene/trunk/test/test_BooleanOr.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.standard import StandardAnalyzer
@@ -118,14 +118,13 @@ class BooleanOrTestCase(PyLuceneTestCase
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_BooleanQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BooleanQuery.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BooleanQuery.py (original)
+++ lucene/pylucene/trunk/test/test_BooleanQuery.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.index import Term
@@ -48,14 +48,13 @@ class TestBooleanQuery(PyLuceneTestCase)
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_CachingWrapperFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_CachingWrapperFilter.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_CachingWrapperFilter.py (original)
+++ lucene/pylucene/trunk/test/test_CachingWrapperFilter.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.standard import StandardAnalyzer
@@ -61,14 +61,13 @@ class CachingWrapperFilterTestCase(PyLuc
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_Collections.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Collections.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Collections.py (original)
+++ lucene/pylucene/trunk/test/test_Collections.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-import unittest, lucene
+import sys, lucene, unittest
 from lucene.collections import JavaSet, JavaList
 
 from java.lang import Class, Boolean, Integer, Long, Double, String

Modified: lucene/pylucene/trunk/test/test_DocBoost.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_DocBoost.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_DocBoost.py (original)
+++ lucene/pylucene/trunk/test/test_DocBoost.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.core import SimpleAnalyzer
@@ -70,14 +70,13 @@ class DocBoostTestCase(PyLuceneTestCase)
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_FilteredQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_FilteredQuery.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_FilteredQuery.py (original)
+++ lucene/pylucene/trunk/test/test_FilteredQuery.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from java.util import BitSet
@@ -119,14 +119,13 @@ class FilteredQueryTestCase(PyLuceneTest
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_Highlighter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Highlighter.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Highlighter.py (original)
+++ lucene/pylucene/trunk/test/test_Highlighter.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from java.io import StringReader
@@ -146,14 +146,13 @@ class HighlighterTestCase(PyLuceneTestCa
         
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_ICUFoldingFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_ICUFoldingFilter.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_ICUFoldingFilter.py (original)
+++ lucene/pylucene/trunk/test/test_ICUFoldingFilter.py Sun Dec 30 22:48:58 2012
@@ -21,7 +21,7 @@ try:
 except ImportError, e:
     pass
 
-from unittest import main
+import sys, lucene, unittest
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 
 from org.apache.lucene.analysis import Analyzer
@@ -77,7 +77,6 @@ class TestICUFoldingFilter(BaseTokenStre
 
 
 if __name__ == "__main__":
-    import sys, lucene
     try:
         import icu
     except ImportError:
@@ -89,10 +88,10 @@ if __name__ == "__main__":
                 sys.argv.remove('-loop')
                 while True:
                     try:
-                        main()
+                        unittest.main()
                     except:
                         pass
             else:
-                 main()
+                 unittest.main()
         else:
             print >>sys.stderr, "ICU version >= 49 is required, running:", icu.ICU_VERSION

Modified: lucene/pylucene/trunk/test/test_ICUNormalizer2Filter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_ICUNormalizer2Filter.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_ICUNormalizer2Filter.py (original)
+++ lucene/pylucene/trunk/test/test_ICUNormalizer2Filter.py Sun Dec 30 22:48:58 2012
@@ -21,7 +21,7 @@ try:
 except ImportError, e:
     pass
 
-from unittest import main
+import sys, lucene, unittest
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 
 from org.apache.lucene.analysis import Analyzer
@@ -79,7 +79,6 @@ class TestICUNormalizer2Filter(BaseToken
 
 
 if __name__ == "__main__":
-    import sys, lucene
     try:
         import icu
     except ImportError:
@@ -90,8 +89,8 @@ if __name__ == "__main__":
             sys.argv.remove('-loop')
             while True:
                 try:
-                    main()
+                    unittest.main()
                 except:
                     pass
         else:
-             main()
+             unittest.main()

Modified: lucene/pylucene/trunk/test/test_ICUTransformFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_ICUTransformFilter.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_ICUTransformFilter.py (original)
+++ lucene/pylucene/trunk/test/test_ICUTransformFilter.py Sun Dec 30 22:48:58 2012
@@ -21,7 +21,7 @@ try:
 except ImportError, e:
     pass
 
-from unittest import main
+import sys, lucene, unittest
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 
 from java.io import StringReader
@@ -77,7 +77,6 @@ class TestICUTransformFilter(BaseTokenSt
 
 
 if __name__ == "__main__":
-    import sys, lucene
     try:
         import icu
     except ImportError:
@@ -88,8 +87,8 @@ if __name__ == "__main__":
             sys.argv.remove('-loop')
             while True:
                 try:
-                    main()
+                    unittest.main()
                 except:
                     pass
         else:
-             main()
+             unittest.main()

Modified: lucene/pylucene/trunk/test/test_IndexDeletionPolicy.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_IndexDeletionPolicy.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_IndexDeletionPolicy.py (original)
+++ lucene/pylucene/trunk/test/test_IndexDeletionPolicy.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.core import WhitespaceAnalyzer
@@ -84,14 +84,13 @@ class IndexDeletionPolicyTestCase(PyLuce
         self.assertEquals(3, DirectoryReader.listCommits(self.directory).size())
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_Not.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Not.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Not.py (original)
+++ lucene/pylucene/trunk/test/test_Not.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.core import SimpleAnalyzer
@@ -46,14 +46,13 @@ class NotTestCase(PyLuceneTestCase):
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PerFieldAnalyzerWrapper.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PerFieldAnalyzerWrapper.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PerFieldAnalyzerWrapper.py (original)
+++ lucene/pylucene/trunk/test/test_PerFieldAnalyzerWrapper.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from java.io import StringReader
@@ -52,14 +52,13 @@ class PerFieldAnalyzerTestCase(PyLuceneT
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PhraseQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PhraseQuery.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PhraseQuery.py (original)
+++ lucene/pylucene/trunk/test/test_PhraseQuery.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis import Analyzer
@@ -264,14 +264,13 @@ class PhraseQueryTestCase(PyLuceneTestCa
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PositionIncrement.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PositionIncrement.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PositionIncrement.py (original)
+++ lucene/pylucene/trunk/test/test_PositionIncrement.py Sun Dec 30 22:48:58 2012
@@ -12,10 +12,10 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
+from lucene import JArray
 from PyLuceneTestCase import PyLuceneTestCase
 from MultiSpansWrapper import MultiSpansWrapper
-from lucene import JArray
 
 from java.io import StringReader
 from org.apache.lucene.analysis import Analyzer
@@ -351,14 +351,13 @@ class PayloadFilter(PythonTokenFilter):
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PrefixFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PrefixFilter.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PrefixFilter.py (original)
+++ lucene/pylucene/trunk/test/test_PrefixFilter.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.document import Document, Field, StringField
@@ -99,14 +99,13 @@ class PrefixFilterTestCase(PyLuceneTestC
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PrefixQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PrefixQuery.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PrefixQuery.py (original)
+++ lucene/pylucene/trunk/test/test_PrefixQuery.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.document import Document, Field, StringField
@@ -49,14 +49,13 @@ class PrefixQueryTestCase(PyLuceneTestCa
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PyLucene.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PyLucene.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PyLucene.py (original)
+++ lucene/pylucene/trunk/test/test_PyLucene.py Sun Dec 30 22:48:58 2012
@@ -12,10 +12,8 @@
 #   limitations under the License.
 # ====================================================================
 
+import sys, lucene, unittest
 import os, shutil
-import lucene   # so that 'org' and 'java' are found
-
-from unittest import TestCase, main
 
 from java.io import File, StringReader
 from org.apache.lucene.analysis.core import WhitespaceAnalyzer
@@ -303,7 +301,7 @@ class Test_PyLuceneBase(object):
             store = self.closeStore(store, reader)
 
         
-class Test_PyLuceneWithFSStore(TestCase, Test_PyLuceneBase):
+class Test_PyLuceneWithFSStore(unittest.TestCase, Test_PyLuceneBase):
 
     STORE_DIR = "testrepo"
 
@@ -339,14 +337,13 @@ class Test_PyLuceneWithMMapStore(Test_Py
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-        main()
+        unittest.main()

Modified: lucene/pylucene/trunk/test/test_PyLuceneThread.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PyLuceneThread.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PyLuceneThread.py (original)
+++ lucene/pylucene/trunk/test/test_PyLuceneThread.py Sun Dec 30 22:48:58 2012
@@ -12,8 +12,8 @@
 #   limitations under the License.
 # ====================================================================
 
+import sys, lucene, unittest
 import time, threading
-from unittest import TestCase, main
 from lucene import getVMEnv
 from PyLuceneTestCase import PyLuceneTestCase
 
@@ -109,14 +109,13 @@ class PyLuceneThreadTestCase(PyLuceneTes
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_PythonDirectory.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PythonDirectory.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PythonDirectory.py (original)
+++ lucene/pylucene/trunk/test/test_PythonDirectory.py Sun Dec 30 22:48:58 2012
@@ -12,10 +12,10 @@
 #   limitations under the License.
 # ====================================================================
 
-import os, sys, unittest, shutil
-from threading import RLock
+import sys, lucene, unittest
+import os, shutil
 import test_PyLucene 
-
+from threading import RLock
 from lucene import JavaError, JArray
 
 from java.lang import String
@@ -256,7 +256,6 @@ class PythonDirectoryTests(unittest.Test
                        
 
 if __name__ == "__main__":
-    import sys, lucene
     env = lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')

Modified: lucene/pylucene/trunk/test/test_PythonQueryParser.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PythonQueryParser.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PythonQueryParser.py (original)
+++ lucene/pylucene/trunk/test/test_PythonQueryParser.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.standard import StandardAnalyzer
@@ -67,14 +67,13 @@ class PythonMultiFieldQueryParserTestCas
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_RegexQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_RegexQuery.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_RegexQuery.py (original)
+++ lucene/pylucene/trunk/test/test_RegexQuery.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.core import SimpleAnalyzer
@@ -84,14 +84,13 @@ class TestRegexQuery(PyLuceneTestCase):
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-        main()
+        unittest.main()

Modified: lucene/pylucene/trunk/test/test_TermRangeQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_TermRangeQuery.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_TermRangeQuery.py (original)
+++ lucene/pylucene/trunk/test/test_TermRangeQuery.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.document import Document, Field, StringField, TextField
@@ -107,14 +107,13 @@ class TermRangeQueryTestCase(PyLuceneTes
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if '-loop' in sys.argv:
         sys.argv.remove('-loop')
         while True:
             try:
-                main()
+                unittest.main()
             except:
                 pass
     else:
-         main()
+         unittest.main()

Modified: lucene/pylucene/trunk/test/test_ThaiAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_ThaiAnalyzer.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_ThaiAnalyzer.py (original)
+++ lucene/pylucene/trunk/test/test_ThaiAnalyzer.py Sun Dec 30 22:48:58 2012
@@ -13,7 +13,7 @@
 #   limitations under the License.
 # ====================================================================
 
-from unittest import TestCase, main
+import sys, lucene, unittest
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 
 from java.io import StringReader
@@ -116,17 +116,16 @@ class ThaiAnalyzerTestCase(BaseTokenStre
 
 
 if __name__ == "__main__":
-    import sys, lucene
     lucene.initVM()
     if ThaiWordFilter.DBBI_AVAILABLE:
         if '-loop' in sys.argv:
             sys.argv.remove('-loop')
             while True:
                 try:
-                    main()
+                    unittest.main()
                 except:
                     pass
         else:
-            main()
+            unittest.main()
     else:
         print >>sys.stderr, "Thai not supported by this JVM, tests skipped"

Modified: lucene/pylucene/trunk/test/test_bug1564.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1564.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1564.py (original)
+++ lucene/pylucene/trunk/test/test_bug1564.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-import unittest, lucene
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.standard import StandardAnalyzer

Modified: lucene/pylucene/trunk/test/test_bug1763.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1763.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1763.py (original)
+++ lucene/pylucene/trunk/test/test_bug1763.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-import unittest, lucene
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.standard import StandardAnalyzer

Modified: lucene/pylucene/trunk/test/test_bug1842.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_bug1842.py?rev=1427010&r1=1427009&r2=1427010&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_bug1842.py (original)
+++ lucene/pylucene/trunk/test/test_bug1842.py Sun Dec 30 22:48:58 2012
@@ -12,7 +12,7 @@
 #   limitations under the License.
 # ====================================================================
 
-import unittest, lucene
+import sys, lucene, unittest
 from PyLuceneTestCase import PyLuceneTestCase
 
 from org.apache.lucene.analysis.standard import StandardAnalyzer



Mime
View raw message