It seems that the test.regrtest module has a possible backward incompatibility with regard to pre-Python 2.3 releases. I have a test suit implemented using the test.regrtest module. In this test suit, my own tests are invoked by a script like this:
import os from test import regrtest
regrtest.STDTESTS =  regrtest.main(testdir=os.getcwd())
This script runs fine with 2.2 but does not with 2.3, since regrtest.py in Python 2.3 has the following lines in runtest() (introduced in Revision 18.104.22.168. See ):
if test.startswith('test.'): abstest = test else: # Always import it from the test package abstest = 'test.' + test the_package = __import__(abstest, globals(), locals(), )
That is, tests must be in a package named "test". However, this package name is already used by the standard library, and AFAIK multiple packages with the same package name cannot exist. In other words, any additional tests (i.e. my own tests) have to be put into the test package in the standard library. Otherwise, the additional tests won't be found. IMHO, this change in 2.3 is not reasonable.
Unless I miss something trivial (I hope so), I'd have to give up using the test.regrtest module. I appreciate any comment.
Tamito> It seems that the test.regrtest module has a possible backward Tamito> incompatibility with regard to pre-Python 2.3 releases. I have Tamito> a test suit implemented using the test.regrtest module.
Tamito> Unless I miss something trivial (I hope so), I'd have to give up Tamito> using the test.regrtest module.
I think this is the best course. The advertised (and supported) way to build test suites in Python is with the unittest module.