def test_require_local_package(nodejs): from fabtools.require.nodejs import package as require_package from fabtools.nodejs import package_version, uninstall_package require_package('underscore', version='1.4.2', local=True) assert package_version('underscore', local=True) == '1.4.2' uninstall_package('underscore', local=True)
def test_require_local_package(nodejs): from fabtools.require.nodejs import package as require_package from fabtools.nodejs import package_version, uninstall_package require_package("underscore", version="1.4.2", local=True) assert package_version("underscore", local=True) == "1.4.2" uninstall_package("underscore", local=True)
def test_require_global_package(nodejs): from fabtools.require.nodejs import package as require_package from fabtools.nodejs import package_version, uninstall_package try: # Require specific version require_package('underscore', version='1.4.1') assert package_version('underscore') == '1.4.1' # Downgrade require_package('underscore', version='1.4.0') assert package_version('underscore') == '1.4.0' # Upgrade require_package('underscore', version='1.4.2') assert package_version('underscore') == '1.4.2' finally: uninstall_package('underscore')
def test_require_global_package(nodejs): from fabtools.require.nodejs import package as require_package from fabtools.nodejs import package_version, uninstall_package # This is not in root's PATH on RedHat systems with path('/usr/local/bin'): try: # Require specific version require_package('underscore', version='1.4.1') assert package_version('underscore') == '1.4.1' # Downgrade require_package('underscore', version='1.4.0') assert package_version('underscore') == '1.4.0' # Upgrade require_package('underscore', version='1.4.2') assert package_version('underscore') == '1.4.2' finally: uninstall_package('underscore')
def test_require_global_package(nodejs): from fabtools.require.nodejs import package as require_package from fabtools.nodejs import package_version, uninstall_package # This is not in root's PATH on RedHat systems with path("/usr/local/bin"): try: # Require specific version require_package("underscore", version="1.4.1") assert package_version("underscore") == "1.4.1" # Downgrade require_package("underscore", version="1.4.0") assert package_version("underscore") == "1.4.0" # Upgrade require_package("underscore", version="1.4.2") assert package_version("underscore") == "1.4.2" finally: uninstall_package("underscore")