File: test_verify_host.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 (15 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pytest

from briefcase.exceptions import UnsupportedHostError


@pytest.mark.parametrize("host_os", ["Darwin", "Linux", "Windows"])
def test_default_os_support(base_command, host_os):
    base_command.tools.host_os = host_os
    base_command.verify_host()


def test_unsupported_os(base_command):
    base_command.tools.host_os = "WeirdOS"
    with pytest.raises(UnsupportedHostError, match="This command is not supported on"):
        base_command.verify_host()