[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Allow multiple tests to be run from a Python test script

From: Michael Haggerty <mhagger_at_alum.mit.edu>
Date: 2006-04-03 15:47:30 CEST

Hello,

I have been working on the cvs2svn project for many months, though I
haven't previously contributed to the subversion project. We at cvs2svn
also use the "svntest" framework for testing the conversion script (via
svn:externals). While working on that project, I came up with a few
ideas for improvements to svntest that I would like to submit.

The first one is in the attachment. It allows an arbitrary subset of
tests to be run in one invocation of a test script, using something like

    $ ./test-script 3 7 9

For orthogonality it also allows the information about specified tests
to be printed out:

    $ ./test-script list 3 7 9

Previously, the example above would have printed information about all
of the tests without executing any.

(I think it would be nice to change the "list" subcommand into a
"--list" option, but that change is not included here.)

Yours,
Michael

[[[
Allow multiple unit tests to be run at once.

Previously, a Python unit test script could run *all* of its tests, or
exactly *one* of them. This change allows an arbitrary selection of
tests to be run in one invocation of the test script.

For orthogonality, I also changed the "list" subcommand to list the
docstrings only for the tests that would otherwise have been executed.
(Thus, "test-script.py list" lists all tests, whereas "test-script.py
list 12 13" lists the information only for tests 12 and 13.)

* subversion/tests/cmdline/svntest/main.py (_internal_run_tests):
  Change second argument from an optional integer to a required list of
  integers. All tests whose numbers are in the list are executed.

  (run_tests): Allow multiple test numbers to be specified on the
  command line. Process the list subcommand only after all
  command-line parameters have been parsed, and if any test numbers
  were passed as arguments, then only list the information for those
  tests. Update function comment.

* subversion/tests/cmdline/README: Updated documentation to describe
  the new possibilities.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Apr 3 15:48:01 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.