[PATCH] test: remove dependency on $PYTHONDIR

timeless timeless at gmail.com
Wed Feb 17 22:03:37 EST 2016


Getting -i to work is *why* I added this.

He's reverting something which I'd just put right back.

The general approach as I understand it is not to just revert
something w/o planning forward.

On Wed, Feb 17, 2016 at 9:59 PM, Sean Farley <sean at farley.io> wrote:
>
> 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