Commits

Hanno Schlichting  committed bce2eed

Changed the testModuleExtract and testRequire tests from DependsTests to use the email package instead of distutils as a test base. The distutils package gets too much special treatment, for example in virtualenv environments, which obscure the test results.

  • Participants
  • Parent commits b9ae1f7
  • Branches setuptools-0.6

Comments (0)

Files changed (1)

File setuptools/tests/__init__.py

 
     def testModuleExtract(self):
         if not get_module_constant: return  # skip on non-bytecode platforms
-        from distutils import __version__
+        from email import __version__
         self.assertEqual(
-            get_module_constant('distutils','__version__'), __version__
+            get_module_constant('email','__version__'), __version__
         )
         self.assertEqual(
             get_module_constant('sys','version'), sys.version
     def testRequire(self):
         if not extract_constant: return  # skip on non-bytecode platforms
 
-        req = Require('Distutils','1.0.3','distutils')
+        req = Require('Email','1.0.3','email')
 
-        self.assertEqual(req.name, 'Distutils')
-        self.assertEqual(req.module, 'distutils')
+        self.assertEqual(req.name, 'Email')
+        self.assertEqual(req.module, 'email')
         self.assertEqual(req.requested_version, '1.0.3')
         self.assertEqual(req.attribute, '__version__')
-        self.assertEqual(req.full_name(), 'Distutils-1.0.3')
+        self.assertEqual(req.full_name(), 'Email-1.0.3')
 
-        from distutils import __version__
+        from email import __version__
         self.assertEqual(req.get_version(), __version__)
         self.failUnless(req.version_ok('1.0.9'))
         self.failIf(req.version_ok('0.9.1'))
         self.failUnless(req.is_present())
         self.failUnless(req.is_current())
 
-        req = Require('Distutils 3000','03000','distutils',format=LooseVersion)
+        req = Require('Email 3000','03000','email',format=LooseVersion)
         self.failUnless(req.is_present())
         self.failIf(req.is_current())
         self.failIf(req.version_ok('unknown'))