git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/5] t/t5800-remote-helpers.sh: Skip with prereq on python <2.4

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 29, 2010, 02:03 UTC
Message-ID
<AANLkTimZ5GFMn3p3UxgWrY1sMpguA4PZ0F=oGtT02JJQ@mail.gmail.com>
In-Reply-To
<20100729011602.GG29156@dert.cs.uchicago.edu>
On Thu, Jul 29, 2010 at 01:16, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 21 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>
>> Change the t/t5800-remote-helpers.sh test to skip with the the
>> three-arg prereq form of test_expect_success instead of bailing out.
>
> Right:
>
>> +++ b/t/t5800-remote-helpers.sh
>> @@ -13,13 +13,11 @@ if sys.hexversion < 0x02040000:
>>      sys.exit(1)
>>  '
>>  then
>> -     :
>> -else
>> -     skip_all='skipping git remote-testgit tests: requires Python 2.4 or newer'
>> -     test_done
>> +    # Requires Python 2.4 or newer
>> +     test_set_prereq PYTHON_24
>>  fi
>
> And as a bonus, this makes the test clearer.  Nice.
Yup, <prereq> is really nice in all regards.
> I would suggest dropping the "Requires Python 2.4" comment, or
> maybe moving it somewhere else with a change to explain that
> it is git-remote-testgit that requires Python ≥ 2.4
> (rather than the remote helper facility in general).
I put it there to make the connection between 24, 0x02040000, and 2.4.

I think trying to avoid confusion like that isn't a problem in a test file, it's pretty obvious from the context that the prereq only has to do with the test. Someone looking up remote helpers is going to do that in the documentation, not in some t/ test file.

Thanks for your continuing & detailed reviews b.t.w.
Previous: Jonathan NiederNext: Ævar Arnfjörð Bjarmason
Message 9 of 11 in “Skip tests using 3-arg test_*”
  1. 0/5 Skip tests using 3-arg test_*Ævar Arnfjörð Bjarmason, Jul 28, 2010
  2. 1/5 tests: implicitly skip SYMLINKS tests using <prereq>Ævar Arnfjörð Bjarmason, Jul 28, 2010
  3. Jonathan NiederJul 29, 2010
  4. 2/5 t/t4004-diff-rename-symlink.sh: use three-arg <prereq>Ævar Arnfjörð Bjarmason, Jul 28, 2010
  5. Jonathan NiederJul 29, 2010
  6. Ævar Arnfjörð BjarmasonJul 29, 2010
  7. 3/5 t/t5800-remote-helpers.sh: Skip with prereq on python <2.4Ævar Arnfjörð Bjarmason, Jul 28, 2010
  8. Jonathan NiederJul 29, 2010
  9. Ævar Arnfjörð BjarmasonJul 29, 2010
  10. 4/5 t/t7800-difftool.sh: Skip with prereq on no PERLÆvar Arnfjörð Bjarmason, Jul 28, 2010
  11. 5/5 t/README: Update "Skipping tests" to align with best practicesÆvar Arnfjörð Bjarmason, Jul 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.