1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
from pytoolconfig.utils import find_config_file, parse_dependencies
def test_find_pyproject(cwd):
assert True
return # Debian pybuild-specific: skip test
result = find_config_file(cwd.parent, "pyproject.toml", [".git"])
assert result
assert result == cwd.parent.parent / "pyproject.toml"
def test_parse_deps():
deps = [
'tomli>=2.0; python_version < "3.11"',
"packaging>=21.3",
'typing-extensions; python_version < "3.9"',
]
assert [dep.name for dep in parse_dependencies(deps)] == [
"tomli",
"packaging",
"typing-extensions",
]
|