You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by "Milo H. Fields III" <mf...@paladin-sys.com> on 2018/02/10 22:52:02 UTC

Unit Test Question - test_Collections.py

# pylucene-7.2.0\test3\test_Collections.py 

# line 109 

class Test_CollectionsBoolList(Test_CollectionsSetBase):

 

    def createTestSet(self):

        return set([True,False])

 

# then at line 248

class Test_CollectionsBoolList(Test_CollectionsListBase):

 

    def createTestList(self):

        return [True,False]

 

 

# Shouldn't the first instance be named?

class Test_CollectionsBoolSet(Test_CollectionsSetBase):

 

It causes issues for the python3.6.4 running on Windows 10

 

 

 


Re: Unit Test Question - test_Collections.py

Posted by Andi Vajda <va...@apache.org>.
> On Feb 12, 2018, at 12:09, Milo H. Fields III <mf...@paladin-sys.com> wrote:
> 
> No worries 
> -- we are testing pylucene against original delivery in Windows, RHEL7 and CentOS 7 as we support these platforms and have started integration of pylucene & lucene/tika into our business logic/CIE systems..

You said Tika ?
I did a “Py” Tika build once. I remember it was a really long JCC command line but it built fine. Let me know, if you’re interested, I have that still in an email somewhere...

Andi..

> We target python3 but I will make sure the changes can be reflected in the python2 unit tests as well.. I'll let you know when I something ready.  
> 
> I'm working off the SVN trunk and assume you prefer a diff patch set..
> 
>> -----Original Message-----
>> From: Andi Vajda [mailto:vajda@apache.org]
>> Sent: Monday, February 12, 2018 13:01
>> To: pylucene-dev@lucene.apache.org
>> Subject: Re: Unit Test Question - test_Collections.py
>> 
>> 
>>> On Feb 12, 2018, at 09:33, Milo H. Fields III <mf...@paladin-sys.com>
>> wrote:
>>> 
>>> Andi,
>>> I have integrated PyLucene into a Visual Studio 2017 project space including
>> support for VS Python unit test fixture (AKA Test Explorer) and other IDE
>> platforms we use that instrument the unit test sets. This required some
>> minor tweaking to the test classes to support running the test suite
>> independent of a command line '__main__' (example below).
>>> ----------------
>>> # PyLuceneTestCase.py  class PyLuceneTestCase #line 32 Method __init__
>>> is:
>>>   def __init__(self, *args):
>>>       super(PyLuceneTestCase, self).__init__(*args)
>>> 
>>> # changed to:
>>>   def __init__(self, *args):
>>>       super(PyLuceneTestCase, self).__init__(*args)
>>>       if not lucene.getVMEnv():
>>>           lucene.initVM(vmargs=['-Djava.awt.headless=true'])
>>> -------------
>>> If you would be interesting in supporting the modifications to the unit test
>> fixtures I will submit them for review & test.
>> 
>> If you send me a patch, I’ll integrate it after checking that it doesn’t break the
>> ‘usual’ way of running tests. As I don’t have access to Windows, I can’t test
>> your fix for its intent nor verify that later changes won’t accidentally break it.
>> 
>> Thank you !
>> 
>> Andi..
>> 
>>> 
>>> v/r
>>> milo..
>>> 
>>>> -----Original Message-----
>>>> From: Andi Vajda [mailto:vajda@apache.org]
>>>> Sent: Saturday, February 10, 2018 20:53
>>>> To: pylucene-dev@lucene.apache.org
>>>> Subject: Re: Unit Test Question - test_Collections.py
>>>> 
>>>> Yes, that looks like a copy/paste error indeed.
>>>> Thank you for reporting this.
>>>> 
>>>> Andi..
>>>> 
>>>>> On Feb 10, 2018, at 14:52, Milo H. Fields III
>>>>> <mf...@paladin-sys.com>
>>>> wrote:
>>>>> 
>>>>> # pylucene-7.2.0\test3\test_Collections.py
>>>>> # line 109
>>>>> class Test_CollectionsBoolList(Test_CollectionsSetBase):
>>>>> 
>>>>>   def createTestSet(self):
>>>>>       return set([True,False])
>>>>> 
>>>>> # then at line 248
>>>>> class Test_CollectionsBoolList(Test_CollectionsListBase):
>>>>> 
>>>>>   def createTestList(self):
>>>>>       return [True,False]
>>>>> 
>>>>> 
>>>>> # Shouldn’t the first instance be named?
>>>>> class Test_CollectionsBoolSet(Test_CollectionsSetBase):
>>>>> 
>>>>> It causes issues for the python3.6.4 running on Windows 10
>>>>> 
>>>>> 
>>>>> 
> 
> 


Re: Unit Test Question - test_Collections.py

Posted by Andi Vajda <va...@apache.org>.
> On Feb 12, 2018, at 12:09, Milo H. Fields III <mf...@paladin-sys.com> wrote:
> 
> No worries 
> -- we are testing pylucene against original delivery in Windows, RHEL7 and CentOS 7 as we support these platforms and have started integration of pylucene & lucene/tika into our business logic/CIE systems..
> We target python3 but I will make sure the changes can be reflected in the python2 unit tests as well.. I'll let you know when I something ready.  
> 
> I'm working off the SVN trunk and assume you prefer a diff patch set..

Yes, that would be essiest.

Thanks !

Andi..

> 
>> -----Original Message-----
>> From: Andi Vajda [mailto:vajda@apache.org]
>> Sent: Monday, February 12, 2018 13:01
>> To: pylucene-dev@lucene.apache.org
>> Subject: Re: Unit Test Question - test_Collections.py
>> 
>> 
>>> On Feb 12, 2018, at 09:33, Milo H. Fields III <mf...@paladin-sys.com>
>> wrote:
>>> 
>>> Andi,
>>> I have integrated PyLucene into a Visual Studio 2017 project space including
>> support for VS Python unit test fixture (AKA Test Explorer) and other IDE
>> platforms we use that instrument the unit test sets. This required some
>> minor tweaking to the test classes to support running the test suite
>> independent of a command line '__main__' (example below).
>>> ----------------
>>> # PyLuceneTestCase.py  class PyLuceneTestCase #line 32 Method __init__
>>> is:
>>>   def __init__(self, *args):
>>>       super(PyLuceneTestCase, self).__init__(*args)
>>> 
>>> # changed to:
>>>   def __init__(self, *args):
>>>       super(PyLuceneTestCase, self).__init__(*args)
>>>       if not lucene.getVMEnv():
>>>           lucene.initVM(vmargs=['-Djava.awt.headless=true'])
>>> -------------
>>> If you would be interesting in supporting the modifications to the unit test
>> fixtures I will submit them for review & test.
>> 
>> If you send me a patch, I’ll integrate it after checking that it doesn’t break the
>> ‘usual’ way of running tests. As I don’t have access to Windows, I can’t test
>> your fix for its intent nor verify that later changes won’t accidentally break it.
>> 
>> Thank you !
>> 
>> Andi..
>> 
>>> 
>>> v/r
>>> milo..
>>> 
>>>> -----Original Message-----
>>>> From: Andi Vajda [mailto:vajda@apache.org]
>>>> Sent: Saturday, February 10, 2018 20:53
>>>> To: pylucene-dev@lucene.apache.org
>>>> Subject: Re: Unit Test Question - test_Collections.py
>>>> 
>>>> Yes, that looks like a copy/paste error indeed.
>>>> Thank you for reporting this.
>>>> 
>>>> Andi..
>>>> 
>>>>> On Feb 10, 2018, at 14:52, Milo H. Fields III
>>>>> <mf...@paladin-sys.com>
>>>> wrote:
>>>>> 
>>>>> # pylucene-7.2.0\test3\test_Collections.py
>>>>> # line 109
>>>>> class Test_CollectionsBoolList(Test_CollectionsSetBase):
>>>>> 
>>>>>   def createTestSet(self):
>>>>>       return set([True,False])
>>>>> 
>>>>> # then at line 248
>>>>> class Test_CollectionsBoolList(Test_CollectionsListBase):
>>>>> 
>>>>>   def createTestList(self):
>>>>>       return [True,False]
>>>>> 
>>>>> 
>>>>> # Shouldn’t the first instance be named?
>>>>> class Test_CollectionsBoolSet(Test_CollectionsSetBase):
>>>>> 
>>>>> It causes issues for the python3.6.4 running on Windows 10
>>>>> 
>>>>> 
>>>>> 
> 
> 


RE: Unit Test Question - test_Collections.py

Posted by "Milo H. Fields III" <mf...@paladin-sys.com>.
No worries 
-- we are testing pylucene against original delivery in Windows, RHEL7 and CentOS 7 as we support these platforms and have started integration of pylucene & lucene/tika into our business logic/CIE systems..
We target python3 but I will make sure the changes can be reflected in the python2 unit tests as well.. I'll let you know when I something ready.  

I'm working off the SVN trunk and assume you prefer a diff patch set..

> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Monday, February 12, 2018 13:01
> To: pylucene-dev@lucene.apache.org
> Subject: Re: Unit Test Question - test_Collections.py
> 
> 
> > On Feb 12, 2018, at 09:33, Milo H. Fields III <mf...@paladin-sys.com>
> wrote:
> >
> > Andi,
> > I have integrated PyLucene into a Visual Studio 2017 project space including
> support for VS Python unit test fixture (AKA Test Explorer) and other IDE
> platforms we use that instrument the unit test sets. This required some
> minor tweaking to the test classes to support running the test suite
> independent of a command line '__main__' (example below).
> > ----------------
> > # PyLuceneTestCase.py  class PyLuceneTestCase #line 32 Method __init__
> > is:
> >    def __init__(self, *args):
> >        super(PyLuceneTestCase, self).__init__(*args)
> >
> > # changed to:
> >    def __init__(self, *args):
> >        super(PyLuceneTestCase, self).__init__(*args)
> >        if not lucene.getVMEnv():
> >            lucene.initVM(vmargs=['-Djava.awt.headless=true'])
> > -------------
> > If you would be interesting in supporting the modifications to the unit test
> fixtures I will submit them for review & test.
> 
> If you send me a patch, I’ll integrate it after checking that it doesn’t break the
> ‘usual’ way of running tests. As I don’t have access to Windows, I can’t test
> your fix for its intent nor verify that later changes won’t accidentally break it.
> 
> Thank you !
> 
> Andi..
> 
> >
> > v/r
> > milo..
> >
> >> -----Original Message-----
> >> From: Andi Vajda [mailto:vajda@apache.org]
> >> Sent: Saturday, February 10, 2018 20:53
> >> To: pylucene-dev@lucene.apache.org
> >> Subject: Re: Unit Test Question - test_Collections.py
> >>
> >> Yes, that looks like a copy/paste error indeed.
> >> Thank you for reporting this.
> >>
> >> Andi..
> >>
> >>> On Feb 10, 2018, at 14:52, Milo H. Fields III
> >>> <mf...@paladin-sys.com>
> >> wrote:
> >>>
> >>> # pylucene-7.2.0\test3\test_Collections.py
> >>> # line 109
> >>> class Test_CollectionsBoolList(Test_CollectionsSetBase):
> >>>
> >>>    def createTestSet(self):
> >>>        return set([True,False])
> >>>
> >>> # then at line 248
> >>> class Test_CollectionsBoolList(Test_CollectionsListBase):
> >>>
> >>>    def createTestList(self):
> >>>        return [True,False]
> >>>
> >>>
> >>> # Shouldn’t the first instance be named?
> >>> class Test_CollectionsBoolSet(Test_CollectionsSetBase):
> >>>
> >>> It causes issues for the python3.6.4 running on Windows 10
> >>>
> >>>
> >>>



Re: Unit Test Question - test_Collections.py

Posted by Andi Vajda <va...@apache.org>.
> On Feb 12, 2018, at 09:33, Milo H. Fields III <mf...@paladin-sys.com> wrote:
> 
> Andi,
> I have integrated PyLucene into a Visual Studio 2017 project space including support for VS Python unit test fixture (AKA Test Explorer) and other IDE platforms we use that instrument the unit test sets. This required some minor tweaking to the test classes to support running the test suite independent of a command line '__main__' (example below). 
> ----------------
> # PyLuceneTestCase.py  class PyLuceneTestCase
> #line 32 Method __init__ is:
>    def __init__(self, *args):
>        super(PyLuceneTestCase, self).__init__(*args)
> 
> # changed to:
>    def __init__(self, *args):
>        super(PyLuceneTestCase, self).__init__(*args)
>        if not lucene.getVMEnv():
>            lucene.initVM(vmargs=['-Djava.awt.headless=true'])
> -------------
> If you would be interesting in supporting the modifications to the unit test fixtures I will submit them for review & test.

If you send me a patch, I’ll integrate it after checking that it doesn’t break the ‘usual’ way of running tests. As I don’t have access to Windows, I can’t test your fix for its intent nor verify that later changes won’t accidentally break it.

Thank you !

Andi..

> 
> v/r
> milo..
> 
>> -----Original Message-----
>> From: Andi Vajda [mailto:vajda@apache.org]
>> Sent: Saturday, February 10, 2018 20:53
>> To: pylucene-dev@lucene.apache.org
>> Subject: Re: Unit Test Question - test_Collections.py
>> 
>> Yes, that looks like a copy/paste error indeed.
>> Thank you for reporting this.
>> 
>> Andi..
>> 
>>> On Feb 10, 2018, at 14:52, Milo H. Fields III <mf...@paladin-sys.com>
>> wrote:
>>> 
>>> # pylucene-7.2.0\test3\test_Collections.py
>>> # line 109
>>> class Test_CollectionsBoolList(Test_CollectionsSetBase):
>>> 
>>>    def createTestSet(self):
>>>        return set([True,False])
>>> 
>>> # then at line 248
>>> class Test_CollectionsBoolList(Test_CollectionsListBase):
>>> 
>>>    def createTestList(self):
>>>        return [True,False]
>>> 
>>> 
>>> # Shouldn’t the first instance be named?
>>> class Test_CollectionsBoolSet(Test_CollectionsSetBase):
>>> 
>>> It causes issues for the python3.6.4 running on Windows 10
>>> 
>>> 
>>> 


RE: Unit Test Question - test_Collections.py

Posted by "Milo H. Fields III" <mf...@paladin-sys.com>.
Andi,
I have integrated PyLucene into a Visual Studio 2017 project space including support for VS Python unit test fixture (AKA Test Explorer) and other IDE platforms we use that instrument the unit test sets. This required some minor tweaking to the test classes to support running the test suite independent of a command line '__main__' (example below). 
----------------
# PyLuceneTestCase.py  class PyLuceneTestCase
#line 32 Method __init__ is:
    def __init__(self, *args):
        super(PyLuceneTestCase, self).__init__(*args)

# changed to:
    def __init__(self, *args):
        super(PyLuceneTestCase, self).__init__(*args)
        if not lucene.getVMEnv():
            lucene.initVM(vmargs=['-Djava.awt.headless=true'])
-------------
If you would be interesting in supporting the modifications to the unit test fixtures I will submit them for review & test.

v/r
milo..

> -----Original Message-----
> From: Andi Vajda [mailto:vajda@apache.org]
> Sent: Saturday, February 10, 2018 20:53
> To: pylucene-dev@lucene.apache.org
> Subject: Re: Unit Test Question - test_Collections.py
> 
> Yes, that looks like a copy/paste error indeed.
> Thank you for reporting this.
> 
> Andi..
> 
> > On Feb 10, 2018, at 14:52, Milo H. Fields III <mf...@paladin-sys.com>
> wrote:
> >
> > # pylucene-7.2.0\test3\test_Collections.py
> > # line 109
> > class Test_CollectionsBoolList(Test_CollectionsSetBase):
> >
> >     def createTestSet(self):
> >         return set([True,False])
> >
> > # then at line 248
> > class Test_CollectionsBoolList(Test_CollectionsListBase):
> >
> >     def createTestList(self):
> >         return [True,False]
> >
> >
> > # Shouldn’t the first instance be named?
> > class Test_CollectionsBoolSet(Test_CollectionsSetBase):
> >
> > It causes issues for the python3.6.4 running on Windows 10
> >
> >
> >

Re: Unit Test Question - test_Collections.py

Posted by Andi Vajda <va...@apache.org>.
Yes, that looks like a copy/paste error indeed.
Thank you for reporting this.

Andi..

> On Feb 10, 2018, at 14:52, Milo H. Fields III <mf...@paladin-sys.com> wrote:
> 
> # pylucene-7.2.0\test3\test_Collections.py
> # line 109
> class Test_CollectionsBoolList(Test_CollectionsSetBase):
>  
>     def createTestSet(self):
>         return set([True,False])
>  
> # then at line 248
> class Test_CollectionsBoolList(Test_CollectionsListBase):
>  
>     def createTestList(self):
>         return [True,False]
>  
>  
> # Shouldn’t the first instance be named?
> class Test_CollectionsBoolSet(Test_CollectionsSetBase):
>  
> It causes issues for the python3.6.4 running on Windows 10
>  
>  
>