lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1758138 - in /lucene/pylucene/trunk: python/ICUNormalizer2Filter.py python/ICUTransformFilter.py test/test_BinaryDocument.py test/test_Collections.py test/test_FuzzyQuery.py test/test_PyLucene.py
Date Sun, 28 Aug 2016 18:47:36 GMT
Author: vajda
Date: Sun Aug 28 18:47:36 2016
New Revision: 1758138

URL: http://svn.apache.org/viewvc?rev=1758138&view=rev
Log:
all tests pass

Modified:
    lucene/pylucene/trunk/python/ICUNormalizer2Filter.py
    lucene/pylucene/trunk/python/ICUTransformFilter.py
    lucene/pylucene/trunk/test/test_BinaryDocument.py
    lucene/pylucene/trunk/test/test_Collections.py
    lucene/pylucene/trunk/test/test_FuzzyQuery.py
    lucene/pylucene/trunk/test/test_PyLucene.py

Modified: lucene/pylucene/trunk/python/ICUNormalizer2Filter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/python/ICUNormalizer2Filter.py?rev=1758138&r1=1758137&r2=1758138&view=diff
==============================================================================
--- lucene/pylucene/trunk/python/ICUNormalizer2Filter.py (original)
+++ lucene/pylucene/trunk/python/ICUNormalizer2Filter.py Sun Aug 28 18:47:36 2016
@@ -62,7 +62,7 @@ class ICUNormalizer2Filter(PythonTokenFi
             if self.normalizer.quickCheck(text) != UNormalizationCheckResult.YES:
                 self.termAtt.setEmpty()
                 self.termAtt.append(self.normalizer.normalize(text))
-                
+
             return True
 
         return False

Modified: lucene/pylucene/trunk/python/ICUTransformFilter.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/python/ICUTransformFilter.py?rev=1758138&r1=1758137&r2=1758138&view=diff
==============================================================================
--- lucene/pylucene/trunk/python/ICUTransformFilter.py (original)
+++ lucene/pylucene/trunk/python/ICUTransformFilter.py Sun Aug 28 18:47:36 2016
@@ -48,7 +48,7 @@ class ICUTransformFilter(PythonTokenFilt
 
     # Create a new ICUTransformFilter that transforms text on the given
     # stream.
-    #  
+    #
     #  @param input {@link TokenStream} to filter.
     #  @param transform Transliterator to transform the text.
 
@@ -80,7 +80,7 @@ class ICUTransformFilter(PythonTokenFilt
                                                         False)
             self.termAtt.setEmpty()
             self.termAtt.append(text)
-            
+
             return True
 
         return False

Modified: lucene/pylucene/trunk/test/test_BinaryDocument.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_BinaryDocument.py?rev=1758138&r1=1758137&r2=1758138&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_BinaryDocument.py (original)
+++ lucene/pylucene/trunk/test/test_BinaryDocument.py Sun Aug 28 18:47:36 2016
@@ -27,7 +27,7 @@ class TestBinaryDocument(PyLuceneTestCas
 
     binaryValStored = "this text will be stored as a byte array in the index"
     binaryValCompressed = "this text will be also stored and compressed as a byte array in
the index"
-  
+
     def testBinaryFieldInIndex(self):
 
         ft = FieldType()
@@ -36,57 +36,57 @@ class TestBinaryDocument(PyLuceneTestCas
         bytes = JArray('byte')(self.binaryValStored)
         binaryFldStored = StoredField("binaryStored", bytes)
         stringFldStored = Field("stringStored", self.binaryValStored, ft)
-        
+
         doc = Document()
         doc.add(binaryFldStored)
         doc.add(stringFldStored)
-        
+
         # test for field count
         self.assertEqual(2, doc.fields.size())
-    
+
         # add the doc to a ram index
         writer = self.getWriter(analyzer=StandardAnalyzer())
         writer.addDocument(doc)
         writer.close()
-    
+
         # open a reader and fetch the document
         reader = self.getReader()
         docFromReader = reader.document(0)
         self.assert_(docFromReader is not None)
-    
+
         # fetch the binary stored field and compare it's content with the
         # original one
         bytes = docFromReader.getBinaryValue("binaryStored")
         binaryFldStoredTest = bytes.bytes.string_
         self.assertEqual(binaryFldStoredTest, self.binaryValStored)
-        
+
         # fetch the string field and compare it's content with the original
         # one
         stringFldStoredTest = docFromReader.get("stringStored")
         self.assertEqual(stringFldStoredTest, self.binaryValStored)
-    
+
         reader.close()
-  
+
     def testCompressionTools(self):
 
         bytes = JArray('byte')(self.binaryValCompressed)
         binaryFldCompressed = StoredField("binaryCompressed", CompressionTools.compress(bytes))
         stringFldCompressed = StoredField("stringCompressed", CompressionTools.compressString(self.binaryValCompressed))
-    
+
         doc = Document()
         doc.add(binaryFldCompressed)
         doc.add(stringFldCompressed)
-    
+
         # add the doc to a ram index
         writer = self.getWriter(analyzer=StandardAnalyzer())
         writer.addDocument(doc)
         writer.close()
-    
+
         # open a reader and fetch the document
         reader = self.getReader()
         docFromReader = reader.document(0)
         self.assert_(docFromReader is not None)
-    
+
         # fetch the binary compressed field and compare it's content with
         # the original one
         bytes = CompressionTools.decompress(docFromReader.getBinaryValue("binaryCompressed"))

Modified: lucene/pylucene/trunk/test/test_Collections.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_Collections.py?rev=1758138&r1=1758137&r2=1758138&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_Collections.py (original)
+++ lucene/pylucene/trunk/test/test_Collections.py Sun Aug 28 18:47:36 2016
@@ -181,15 +181,15 @@ class Test_CollectionsListBase(unittest.
         elem1 = jArray[1]
         listElem0 = self.testList[0]
         listElem1 = self.testList[1]
-        
+
         self.assertEqual(elem0, listElem0,
                          "should be equal: %s (%s) <-> %s (%s)" % (
                             elem0,type(elem0), listElem0, type(listElem0)))
-        
+
         self.assertEqual(elem1, listElem1,
                          "should be equal: %s (%s) <-> %s (%s)" % (
                             elem1,type(elem1), listElem1, type(listElem1)))
-            
+
         self.assertEqual(type(elem0), type(listElem0),
                          "should have same type: %s <-> %s" % (
                             type(elem0), type(listElem0)))
@@ -219,11 +219,11 @@ class Test_CollectionsListBase(unittest.
         self.assertEqual(elem0, listElem0,
                          "should be equal: %s (%s) <-> %s (%s)" % (
                             elem0, type(elem0), listElem0, type(listElem0)))
-        
+
         self.assertEqual(elem1, listElem1,
                          "should be equal: %s (%s) <-> %s (%s)" % (
                             elem1, type(elem1), listElem1, type(listElem1)))
-        
+
         self.assertEqual(type(elem0), type(listElem0),
                          "should have same type: %s <-> %s" % (
                             type(elem0), type(listElem0)))

Modified: lucene/pylucene/trunk/test/test_FuzzyQuery.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_FuzzyQuery.py?rev=1758138&r1=1758137&r2=1758138&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_FuzzyQuery.py (original)
+++ lucene/pylucene/trunk/test/test_FuzzyQuery.py Sun Aug 28 18:47:36 2016
@@ -79,7 +79,7 @@ class FuzzyQueryTestCase(PyLuceneTestCas
         query = FuzzyQuery(Term("field", "aaaaa"), FuzzyQuery.defaultMaxEdits, 6)
         hits = searcher.search(query, 1000).scoreDocs
         self.assertEqual(1, len(hits))
-    
+
         # test scoring
         query = FuzzyQuery(Term("field", "bbbbb"), FuzzyQuery.defaultMaxEdits, 0)
         hits = searcher.search(query, 1000).scoreDocs
@@ -160,12 +160,12 @@ class FuzzyQueryTestCase(PyLuceneTestCas
         query = FuzzyQuery(Term("field", "aaaac"), FuzzyQuery.defaultMaxEdits, 5)
         hits = searcher.search(query, 1000).scoreDocs
         self.assertEqual(0, len(hits))
-    
+
         query = FuzzyQuery(Term("field", "ddddX"), FuzzyQuery.defaultMaxEdits, 0)
         hits = searcher.search(query, 1000).scoreDocs
         self.assertEqual(1, len(hits))
         self.assertEqual(searcher.doc(hits[0].doc).get("field"), ("ddddd"))
-    
+
         # now with prefix
         query = FuzzyQuery(Term("field", "ddddX"), FuzzyQuery.defaultMaxEdits, 1)
         hits = searcher.search(query, 1000).scoreDocs
@@ -190,7 +190,7 @@ class FuzzyQueryTestCase(PyLuceneTestCas
         query = FuzzyQuery(Term("field", "ddddX"), FuzzyQuery.defaultMaxEdits, 5)
         hits = searcher.search(query, 1000).scoreDocs
         self.assertEqual(0, len(hits))
-    
+
         # different field = no match:
         query = FuzzyQuery(Term("anotherfield", "ddddX"), FuzzyQuery.defaultMaxEdits, 0)
         hits = searcher.search(query, 1000).scoreDocs
@@ -279,7 +279,7 @@ class FuzzyQueryTestCase(PyLuceneTestCas
         reader = writer.getReader()
         searcher = self.getSearcher(reader=reader)
         writer.close()
-    
+
         query = FuzzyQuery(Term("field", "lucene"))
         query.setRewriteMethod(MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(50))
         hits = searcher.search(query, 1000).scoreDocs

Modified: lucene/pylucene/trunk/test/test_PyLucene.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_PyLucene.py?rev=1758138&r1=1758137&r2=1758138&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_PyLucene.py (original)
+++ lucene/pylucene/trunk/test/test_PyLucene.py Sun Aug 28 18:47:36 2016
@@ -80,7 +80,7 @@ class Test_PyLuceneBase(object):
                           StoredField.TYPE))
             doc.add(Field("meta_words", "rabbits are beautiful",
                           TextField.TYPE_NOT_STORED))
-        
+
             writer.addDocument(doc)
         finally:
             self.closeStore(store, writer)



Mime
View raw message