File: test_pyproject.py

package info (click to toggle)
python-briefcase 0.3.22-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,300 kB
  • sloc: python: 59,405; makefile: 57
file content (12 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
def test_missing_pyproject_file(convert_command):
    """An empty dict is returned if there is no pyproject file."""
    assert not (convert_command.base_path / "pyproject.toml").exists()
    assert convert_command.pyproject == {}


def test_present_pyproject_file(convert_command):
    """The pyproject.toml file is loaded if it is present."""
    (convert_command.base_path / "pyproject.toml").write_text(
        '[project]\nname="project-name"', encoding="utf-8"
    )
    assert convert_command.pyproject == {"project": {"name": "project-name"}}