[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.1,1.2 test_email_codecs.py,1.2,1.3

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Tue, 23 Jul 2002 12:04:16 -0700


Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory usw-pr-cvs1:/tmp/cvs-serv26271/Lib/email/test

Modified Files:
	test_email.py test_email_codecs.py 
Log Message:
Get rid of relative imports in all unittests.  Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_email.py	19 Jul 2002 22:29:00 -0000	1.1
--- test_email.py	23 Jul 2002 19:03:42 -0000	1.2
***************
*** 33,37 ****
  
  from test.test_support import findfile, run_unittest
! from test.test_support import __file__ as test_support_file
  
  
--- 33,37 ----
  
  from test.test_support import findfile, run_unittest
! from email.test import __file__ as landmark
  
  
***************
*** 46,50 ****
  
  def openfile(filename):
!     path = os.path.join(os.path.dirname(test_support_file), 'data', filename)
      return open(path)
  
--- 46,50 ----
  
  def openfile(filename):
!     path = os.path.join(os.path.dirname(landmark), 'data', filename)
      return open(path)
  

Index: test_email_codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email_codecs.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_email_codecs.py	21 Jul 2002 06:06:30 -0000	1.2
--- test_email_codecs.py	23 Jul 2002 19:03:42 -0000	1.3
***************
*** 3,7 ****
  
  import unittest
! from test_support import TestSkipped, run_unittest
  
  from email.test.test_email import TestEmailBase
--- 3,7 ----
  
  import unittest
! from test.test_support import TestSkipped, run_unittest
  
  from email.test.test_email import TestEmailBase