示例#1
0
 def test_cant_import(self):
     version = ':versiontools:nonexisting:'
     try:
         handle_version(self.dist, None, version)
     except Exception:
         e = sys.exc_info()[1]
         self.assertTrue(isinstance(e, DistutilsSetupError))
         self.assertEqual(str(e), "Unable to import 'nonexisting': "
                                   "No module named nonexisting")
示例#2
0
 def test_not_found(self):
     version = ':versiontools:versiontools:__nonexisting__'
     try:
         handle_version(self.dist, None, version)
     except Exception:
         e = sys.exc_info()[1]
         self.assertTrue(isinstance(e, DistutilsSetupError))
         self.assertEqual(str(e), "Unable to access '__nonexisting__' in "
                                   "'versiontools': 'module' object has "
                                   "no attribute '__nonexisting__'")
示例#3
0
 def test_cant_import(self):
     version = ':versiontools:nonexisting:'
     try:
         handle_version(self.dist, None, version)
     except Exception:
         e = sys.exc_info()[1]
         self.assertTrue(isinstance(e, DistutilsSetupError))
         self.assertEqual(
             str(e), "Unable to import 'nonexisting': "
             "No module named nonexisting")
示例#4
0
 def test_not_found(self):
     version = ':versiontools:versiontools:__nonexisting__'
     try:
         handle_version(self.dist, None, version)
     except Exception:
         e = sys.exc_info()[1]
         self.assertTrue(isinstance(e, DistutilsSetupError))
         self.assertEqual(
             str(e), "Unable to access '__nonexisting__' in "
             "'versiontools': 'module' object has "
             "no attribute '__nonexisting__'")