def test_basic_integration(python_version, core, tmp_path, pdm):
    """An e2e test case to ensure PDM works on all supported Python versions"""
    project = core.create_project(tmp_path)
    project.project_config["python.use_venv"] = True
    project.pyproject.set_data(PYPROJECT)
    project.root.joinpath("foo.py").write_text("import django\n")
    project._environment = None
    pdm(["use", "-f", python_version], obj=project, strict=True, cleanup=False)
    pdm(["add", "django", "-v"], obj=project, strict=True, cleanup=False)
    with cd(project.root):
        pdm(["run", "python", "foo.py"], obj=project, strict=True, cleanup=False)
        pdm(["build", "-v"], obj=project, strict=True, cleanup=False)
    pdm(["remove", "-v", "django"], obj=project, strict=True, cleanup=False)
    result = pdm(["list"], obj=project, strict=True)
    assert not any(line.strip().lower().startswith("django") for line in result.output.splitlines())
An e2e test case to ensure PDM works on all supported Python versions
tests/test_integration.py