[Patches] [ python-Patches-585101 ] Fix relative imports in regression tests

noreply@sourceforge.net noreply@sourceforge.net
Tue, 23 Jul 2002 08:50:42 -0700


Patches item #585101, was opened at 2002-07-22 15:53
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=585101&group_id=5470

Category: Tests
Group: Python 2.3
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: Fix relative imports in regression tests

Initial Comment:
The regression test suite uses intrapackage relative
imports to import stuff like test_support, etc. 
There's no deep reason for this to be so, since "test"
is a standard package.  As long as all tests do
something like "from test import test_support" or
"import test.test_support" everything works fine. 
Keeping the relative imports makes life more difficult
for tests that don't live in the expected location of
Lib/test.

This patch fixes this by making sure all test imports
are absolute.  This works fine on *nix, but rumor has
it that the Mac tests are run differently so I'd like
Jack to comment on whether this patch breaks his test
suite or not.

----------------------------------------------------------------------

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-07-23 11:50

Message:
Logged In: YES 
user_id=12800

Cool.  I'll go ahead and commit these changes and then you
and Tim can both beat me up.  Guido's at OSCON so he'll have
to wait a week to beat me up. :)

----------------------------------------------------------------------

Comment By: Jack Jansen (jackjansen)
Date: 2002-07-23 05:59

Message:
Logged In: YES 
user_id=45365

I can't test the patch right now, but after visual I can't imagine that it would cause any problems on the mac. Go ahead and check it in, I would say, and I'll complain when it breaks things:-)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=585101&group_id=5470