[qmtest] patch: Allow creation of explicit suites via 'qmtest create', etc.

Mark Mitchell mark at codesourcery.com
Mon Jul 17 18:33:10 UTC 2006


Stefan Seefeld wrote:
> The attached patch enables 'qmtest create' to be used to add explicit suites,
> and makes 'qmtest ls' more useful with suites (in particular explicit suites
> that are not directories).

That's nice!

> -            if issubclass(extension_class, Runnable):
> -                extras = { Runnable.EXTRA_ID : extension_id, 
> -                           Runnable.EXTRA_DATABASE : database }
> +            if issubclass(extension_class, (Runnable, Suite)):
> +                extras = { 'qmtest_id' : extension_id, 
> +                           'qmtest_database' : database }

The idea here was to avoid "magic strings".  Perhaps we could add
Suite.EXTRA_ID and Suite.EXTRA_DATABASE, and then this could be:

  extras = { extension_class.EXTRA_ID : ...,
             extension_class.EXTRA_DATABASE : ... }

?

OK with that change.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark at codesourcery.com
(650) 331-3385 x713



More information about the qmtest mailing list