Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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)
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)