How to use the requirementslib.models.pipfile.Pipfile.load_projectfile function in requirementslib

To help you get started, we’ve selected a few requirementslib 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 sarugaku / requirementslib / tests / unit / test_pipfile.py View on Github external
def test_failures(pathlib_tmpdir):
    with pytest.raises(RuntimeError):
        Pipfile.load_projectfile(None)
    fake_path = Path("my_fake_directory").absolute()
    with pytest.raises(FileNotFoundError):
        Pipfile.load_projectfile(fake_path)
    project_dir = pathlib_tmpdir.joinpath("project")
    project_dir.mkdir()
    with pytest.raises(RequirementError):
        Pipfile.load_projectfile(project_dir, create=False)
github sarugaku / requirementslib / tests / unit / test_pipfile.py View on Github external
def test_failures(pathlib_tmpdir):
    with pytest.raises(RuntimeError):
        Pipfile.load_projectfile(None)
    fake_path = Path("my_fake_directory").absolute()
    with pytest.raises(FileNotFoundError):
        Pipfile.load_projectfile(fake_path)
    project_dir = pathlib_tmpdir.joinpath("project")
    project_dir.mkdir()
    with pytest.raises(RequirementError):
        Pipfile.load_projectfile(project_dir, create=False)
github sarugaku / requirementslib / tests / unit / test_pipfile.py View on Github external
def test_failures(pathlib_tmpdir):
    with pytest.raises(RuntimeError):
        Pipfile.load_projectfile(None)
    fake_path = Path("my_fake_directory").absolute()
    with pytest.raises(FileNotFoundError):
        Pipfile.load_projectfile(fake_path)
    project_dir = pathlib_tmpdir.joinpath("project")
    project_dir.mkdir()
    with pytest.raises(RequirementError):
        Pipfile.load_projectfile(project_dir, create=False)