On 31.07.19 22:42, Kevin Wolf wrote: > We're getting a ridiculous number of child classes of > TestInitiallyFilled and TestInitiallyEmpty that differ only in a few > attributes that we want to test in all combinations. > > Instead of explicitly writing down every combination, let's use a loop > and create those classes dynamically. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > tests/qemu-iotests/118 | 69 +++++++++++++----------------------------- > 1 file changed, 21 insertions(+), 48 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com> > + name = '%s_%s_%s' % (case.__name__, media, interface) > + globals()[name] = type(name, (case, ), attr) Äh. OK. Well, learned about that (trailing comma) today, I guess.
signature.asc
Description: OpenPGP digital signature