[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pybuild and testing pytest plugins



On 1/14/19 1:36 PM, Piotr Ożarowski wrote:
>> Conceptually I think it's more relevant to override dh_auto_test. To make
>> sure pytest will register the plugin one may tweak the $PYTHONPATH. That's
>> the approach I followed in pytest-flask, see [1].
> 
>> [1] https://salsa.debian.org/python-team/modules/pytest-flask/blob/debian/master/debian/rules
> 
> while tests are run in build target (not my choice, I'd check installed files)
> I strongly advise to *not* use source files (i.e. "PYTHONPATH=$(CURDIR)")
> in dh_auto_test, especially if you build an extension. pybuild changes
> directory for a reason.
> 
> If you need some files from source directory during tests, please list
> them in debian/pybuild.testfiles file and pybuild will copy them to
> build directory (and remove after tests). See pybuild manpage for more info.
> 

Aha, will try to do so for pytest-flask.
Thanks for the input. :)


Reply to: