[Python-Dev] possible backward incompatibility in test.regrtest (original) (raw)

Michael Chermside mcherm at mcherm.com
Mon Dec 1 15:12:08 EST 2003


Unless I miss something trivial (I hope so), I'd have to give up using the test.regrtest module. I appreciate any comment.

Maybe the thing to do is to change:

if test.startswith('test.'): abstest = test else: # Always import it from the test package abstest = 'test.' + test thepackage = import(abstest, globals(), locals(), [])

to this:

if test.startswith('mytest.'): abstest = test else: # Always import it from the test package abstest = 'mytest.' + test thepackage = import(abstest, globals(), locals(), [])

in your own copy of regrtest. Converting to unittest would be better, but this is a fix that would at least prevent immediate breakage.

-- Michael Chermside



More information about the Python-Dev mailing list