File: test_full_options.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 (21 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from briefcase.commands.base import full_options


def test_no_state():
    """If there's no state, just kwargs are returned."""
    assert full_options(None, {"a": 1, "b": 2}) == {"a": 1, "b": 2}


def test_state():
    """If there's state, it is added to kwargs."""
    assert full_options({"c": 3, "d": 4}, {"a": 1, "b": 2}) == {
        "a": 1,
        "b": 2,
        "c": 3,
        "d": 4,
    }


def test_state_with_overlap():
    """If there's overlap between state and kwargs, state takes precedence."""
    assert full_options({"a": 3, "d": 4}, {"a": 1, "b": 2}) == {"a": 3, "b": 2, "d": 4}