Hanno Schlichting avatar 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.

Comments (0)

Files changed (1)


     def testModuleExtract(self):
         if not get_module_constant: return  # skip on non-bytecode platforms
-        from distutils import __version__
+        from email import __version__
-            get_module_constant('distutils','__version__'), __version__
+            get_module_constant('email','__version__'), __version__
             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__)
-        req = Require('Distutils 3000','03000','distutils',format=LooseVersion)
+        req = Require('Email 3000','03000','email',format=LooseVersion)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.