[PATCH 1 of 2 eac] Extract datapath class method as a function

gvandevelde guillaume.vandevelde at logilab.fr
Thu Sep 5 09:34:12 CEST 2019


Okay, it was a preparation for a splitting of the tests that has been 
finally abandonned.

This changeset is now removed.

On 9/5/19 8:59 AM, Denis Laxalde wrote:
> Frank Bessou a écrit :
>> # HG changeset patch
>> # User Frank Bessou <frank.bessou at logilab.fr>
>> # Date 1567608050 -7200
>> #      Wed Sep 04 16:40:50 2019 +0200
>> # Node ID 850a27100121faf395d73dec6436f9ad7c4f10da
>> # Parent  63196f5cf34086f24a4f46bd21d7185a22364863
>> # Available At http://hg.logilab.org/review/cubes/eac
>> #              hg pull http://hg.logilab.org/review/cubes/eac -r 850a27100121
>> Extract datapath class method as a function
>>
>> This will be used in several classes.
>>
>> diff --git a/test/test_dataimport.py b/test/test_dataimport.py
>> --- a/test/test_dataimport.py
>> +++ b/test/test_dataimport.py
>> @@ -811,7 +811,7 @@ class EACXMLParserTC(unittest.TestCase):
>>   class EACDataImportTC(CubicWebTC):
>>   
>>       def test_FRAD033_EAC_00001(self):
>> -        fpath = self.datapath('FRAD033_EAC_00001_simplified.xml')
>> +        fpath = datapath('FRAD033_EAC_00001_simplified.xml')
> CubicWebTC has the datapath method so there's no need to replace
> its usage in child classes I think. Is there more than one plain
> unittest.TestCase class in this file? Otherwise, extracting the function
> is not worth it I think.
>
>>           with self.admin_access.repo_cnx() as cnx:
>>               # create a skos concept to ensure it's used instead of a ExternalUri
>>               scheme = cnx.create_entity('ConceptScheme')



More information about the saem-devel mailing list