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")
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")
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__'")
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__'")