zonemaster-cli icon indicating copy to clipboard operation
zonemaster-cli copied to clipboard

Update the --test option

Open matsduf opened this issue 4 years ago • 0 comments

If only the test cases in a module or a single test case is to be run, then the --test option can be used:

	--test STR...          Specify test to run. Should be either the name
	                       of a module, or the name of a module and the
	                       name of a method in that module separated by a
	                       "/" character (Example: "Basic/basic1"). The
	                       method specified must be one that takes a zone
	                       object as its single argument. This switch can
	                       be repeated.

To run all Basic test cases run zonemaster-cli --test basic, but to test only test case Basic04, then "basic" has to be repeated, zonemaster-cli --test basic/basic04. The module can always be deduced from the test case identifier, and the difference between test case identifier vs. module name can always be deduced from the existence of digits a the end.

This issue suggests that the value of the --test option should also accept the test case identifier only. I.e. all the following three forms:

  • --test basic # test all test cases in the basic module
  • --test basic/basic04 # test Basic04 only
  • --test basic04 # test Basic04 only

matsduf avatar Nov 29 '21 11:11 matsduf