def test_check_package_local(self): """Test for a locally-installed package.""" lib_dir = get_python_lib() installed_package = list(pkg_resources.working_set)[0].project_name self.assertTrue( package.check_package_exists(installed_package, lib_dir))
def test_check_package_local(self): """Test for a locally-installed package.""" lib_dir = get_python_lib() installed_package = list(pkg_resources.working_set)[0].project_name self.assertTrue( package.check_package_exists(installed_package, lib_dir) )
def test_install_package_zip(self): """Test an install attempt from a zip path.""" self.assertFalse(package.check_package_exists( TEST_ZIP_REQ, self.lib_dir)) self.assertFalse(package.check_package_exists( TEST_NEW_REQ, self.lib_dir)) self.assertTrue(package.install_package( TEST_ZIP_REQ, True, self.lib_dir)) self.assertTrue(package.check_package_exists( TEST_ZIP_REQ, self.lib_dir)) self.assertTrue(package.check_package_exists( TEST_NEW_REQ, self.lib_dir)) try: import pyhelloworld3 except ImportError: self.fail('Unable to import pyhelloworld3 after installing it.') self.assertEqual(pyhelloworld3.__version__, '1.0.0')
def test_install_package_zip(self): """Test an install attempt from a zip path.""" self.assertFalse( package.check_package_exists(TEST_ZIP_REQ, self.lib_dir)) self.assertFalse( package.check_package_exists(TEST_NEW_REQ, self.lib_dir)) self.assertTrue( package.install_package(TEST_ZIP_REQ, True, self.lib_dir)) self.assertTrue( package.check_package_exists(TEST_ZIP_REQ, self.lib_dir)) self.assertTrue( package.check_package_exists(TEST_NEW_REQ, self.lib_dir)) try: import pyhelloworld3 except ImportError: self.fail('Unable to import pyhelloworld3 after installing it.') self.assertEqual(pyhelloworld3.__version__, '1.0.0')
def test_check_package_zip(self): """Test for an installed zip package.""" self.assertFalse(package.check_package_exists(TEST_ZIP_REQ, None))
def test_check_package_global(self): """Test for a globally-installed package.""" installed_package = list(pkg_resources.working_set)[0].project_name self.assertTrue(package.check_package_exists(installed_package, None))
def test_install_existing_package(self): """Test an install attempt on an existing package.""" self.assertTrue(package.check_package_exists( TEST_EXIST_REQ, self.lib_dir)) self.assertTrue(package.install_package(TEST_EXIST_REQ))
def test_install_existing_package(self): """ Test an install attempt on an existing package """ self.assertTrue( package.check_package_exists(TEST_EXIST_REQ, self.lib_dir)) self.assertTrue(package.install_package(TEST_EXIST_REQ))
def test_check_package_zip(): """Test for an installed zip package.""" assert not package.check_package_exists(TEST_ZIP_REQ)
def test_check_package_global(): """Test for an installed package.""" installed_package = list(pkg_resources.working_set)[0].project_name assert package.check_package_exists(installed_package)