def test_install_pip_svn(venv): """Test installation of a package from VCS (git).""" work_dir = os.path.join(_DATA_DIR, "install", "requirements_svn") with cwd(work_dir), pytest.raises( micropipenv.NotSupportedError, match= r"Non-Git VCS requirement 'svn\+svn://svn.repo/some_pkg/trunk/#egg=SomePackage' is not supported yet", ): micropipenv.install_requirements(get_pip_path(venv))
def test_install_pip_print_freeze(venv): """Test invoking installation when raw requirements.txt are used. This test uses directly the installation method to verify pip freeze being printed. """ work_dir = os.path.join(_DATA_DIR, "install", "requirements") with cwd(work_dir): flexmock(micropipenv).should_receive("_maybe_print_pip_freeze").once() micropipenv.install_requirements(get_pip_path(venv)) assert str(venv.get_version("requests")) == "1.0.0"
def test_install_pip_tools_print_lock(venv): """Test invoking installation when pip-tools style requirements.txt are used. This test uses directly method to verify the lock file is printed. """ work_dir = os.path.join(_DATA_DIR, "install", "pip-tools") with cwd(work_dir): flexmock(micropipenv).should_receive("_maybe_print_pipfile_lock").once() micropipenv.install_requirements(get_pip_path(venv)) assert str(venv.get_version("daiquiri")) == "2.0.0" assert str(venv.get_version("python-json-logger")) == "0.1.11"