File: test_ensure_str.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-- 371 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.integrations.subprocess import ensure_str


@pytest.mark.parametrize(
    "indata, output",
    [
        ("a string 1\na string 2", "a string 1\na string 2"),
        (b"some bytes 1\nsome bytes 2", "some bytes 1\nsome bytes 2"),
        (1024, "1024"),
    ],
)
def test_ensure_str(indata, output):
    assert ensure_str(indata) == output