On 2019/06/20 15:56, Jeremie Courreges-Anglas wrote:
> On Thu, Jun 20 2019, Kurt Mosiejczuk <kurt@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.
>
> > Tweak the PERMIT line to the new style while here.
> >
> > cc sebastia@ (maintainer)
>
>
> --- Makefile.~1.5.~ Thu Jun 20 15:42:58 2019
> +++ Makefile Thu Jun 20 15:49:36 2019
> @@ -24,6 +24,8 @@ RUN_DEPENDS= devel/py-future${MODPY_FLAVOR}
> TEST_DEPENDS= devel/flake8 \
> devel/py-hypothesis${MODPY_FLAVOR}
>
> +TEST_ENV= PYTHONPATH="."
> +
> post-install:
> mv ${PREFIX}/bin/cmark ${PREFIX}/bin/commonmark${MODPY_BIN_SUFFIX}
>
>
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
>
I think that is preferable and I would like to see it in more ports in the
tree so when I search for a random example I'm more likely to find it than
the common "TEST_DEPENDS=(self)" type.. :-)
No comments:
Post a Comment