Small nit, found by Neal.

This commit is contained in:
Georg Brandl 2007-03-06 18:21:32 +00:00
parent e95cf1c8a2
commit cff1ae3a2f
1 changed files with 2 additions and 2 deletions

View File

@ -2631,10 +2631,10 @@ __test__ = {"_TestClass": _TestClass,
def _test(): def _test():
testfiles = [arg for arg in sys.argv[1:] if arg and arg[0] != '-'] testfiles = [arg for arg in sys.argv[1:] if arg and arg[0] != '-']
if len(testfiles) > 0: if testfiles:
for filename in testfiles: for filename in testfiles:
if filename.endswith(".py"): if filename.endswith(".py"):
# This is a module -- insert its dir into sys.path and try to # It is a module -- insert its dir into sys.path and try to
# import it. If it is part of a package, that possibly won't work # import it. If it is part of a package, that possibly won't work
# because of package imports. # because of package imports.
dirname, filename = os.path.split(filename) dirname, filename = os.path.split(filename)