On Thu, Jun 20 2019, Kurt Mosiejczuk <k...@cranky.work> wrote:
> On Thu, Jun 20, 2019 at 03:56:34PM +0200, Jeremie Courreges-Anglas wrote:
>> On Thu, Jun 20 2019, Kurt Mosiejczuk <k...@cranky.work> wrote:
>> > Paco Esteban just had trouble running the tests for py-commonmark because
>> > the module needs itself installed to run the tests. This simple diff
>> > adds itself to the TEST_DEPENDS to fix that.
>
>> Not objecting, but there's another approach which I tend to prefer: use
>> PYTHONPATH so that the tested code is the code actually being built and
>> packaged.  Skipping the update/reinstall step also makes testing updates
>> easier.
>
>> Suggested approach, "624 tests passed, 0 failed" both with py2
>> and py3.
>
> Oh. I like this *much* better. This is immediately going in my toolbox.
>
> Do you know if it ever breaks things to have PYTHONPATH="."? Would it be
> worth having the lang/python module do that automatically?

As a knob for MODPY_TEST_CMD only, I guess it should be safe.  Maybe it
could also be a setting (MODPY_TEST_PYTHONPATH)?

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to