~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/test/regrtest.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
 
206
206
    test_support.record_original_stdout(sys.stdout)
207
207
    try:
208
 
        opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wM:',
 
208
        opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:wM:',
209
209
                                   ['help', 'verbose', 'quiet', 'exclude',
210
210
                                    'single', 'slow', 'random', 'fromfile',
211
211
                                    'findleaks', 'use=', 'threshold=', 'trace',
285
285
                        use_resources.remove(r)
286
286
                elif r not in use_resources:
287
287
                    use_resources.append(r)
 
288
        else:
 
289
            print >>sys.stderr, ("No handler for option {0}.  Please "
 
290
                "report this as a bug at http://bugs.python.org.").format(o)
 
291
            sys.exit(1)
288
292
    if single and fromfile:
289
293
        usage(2, "-s and -f don't go together!")
290
294
 
1187
1191
    # much of the testing framework relies on the globals in the
1188
1192
    # test.test_support module.
1189
1193
    mydir = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
1190
 
    i = pathlen = len(sys.path)
 
1194
    i = len(sys.path)
1191
1195
    while i >= 0:
1192
1196
        i -= 1
1193
1197
        if os.path.abspath(os.path.normpath(sys.path[i])) == mydir:
1194
1198
            del sys.path[i]
1195
 
    if len(sys.path) == pathlen:
1196
 
        print 'Could not find %r in sys.path to remove it' % mydir
1197
1199
    main()