[PATCH] test: remove dependency on $PYTHONDIR

Sean Farley sean at farley.io
Wed Feb 17 21:59:17 EST 2016


timeless <timeless at gmail.com> writes:

> Durham Goode  wrote:
>> Our path is derived from the PYTHONPATH we're setting.  We could set another
>> environment variable to inform the test runner of what the PYTHONDIR should
>> be, but I feel like the tests shouldn't be making assumptions about where
>> the tests are running (and don't really need to).
>
> The tests don't need to, but to have a chance at automatically dealing
> w/ changes in the test output, it's really helpful for the output to
> not require globs.
>
> If we have a line like:
>
> *: 50 (glob)
>
> then when the line becomes
> foo/bar/baz: 51
>
> you end up w/ a diff of:
>
> -*: 50 (glob)
> +foo/bar/baz: 51
>
> You can't accept the
> And you're stuck manually rebuilding any globs (for the example here,
> it's incredibly annoying).
>
> OTOH, if the line is:
>
> $PYTHONDIR: 50
>
> Then the output is:
> $PYTHONDIR: 51
>
> And you can say "yes" to the -i prompt to accept the changes.

To be fair to Durham, I think getting -i to work with glob is outside
the scope of this patch. I much prefer getting rid of $PYTHONPATH than
getting -i to work with globs.

I could be wrong here, though.


More information about the Mercurial-devel mailing list