How to use the shiv.constants.PIP_REQUIRE_VIRTUALENV function in shiv

To help you get started, we’ve selected a few shiv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linkedin / shiv / test / test_pip.py View on Github external
def test_clean_pip_env(monkeypatch):

    before_env_var = "test"
    monkeypatch.setenv(PIP_REQUIRE_VIRTUALENV, before_env_var)

    with clean_pip_env():
        assert PIP_REQUIRE_VIRTUALENV not in os.environ

    assert os.environ.get(PIP_REQUIRE_VIRTUALENV) == before_env_var
github linkedin / shiv / test / test_pip.py View on Github external
def test_clean_pip_env(monkeypatch):

    before_env_var = "test"
    monkeypatch.setenv(PIP_REQUIRE_VIRTUALENV, before_env_var)

    with clean_pip_env():
        assert PIP_REQUIRE_VIRTUALENV not in os.environ

    assert os.environ.get(PIP_REQUIRE_VIRTUALENV) == before_env_var