File: test_utils.py

package info (click to toggle)
pytoolconfig 1.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: python: 846; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (3)
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",
    ]