tests/integrations/subprocess/test_ensure_str.py
raw| 1 | import pytest |
| 2 | |
| 3 | from briefcase.integrations.subprocess import ensure_str |
| 4 | |
| 5 | |
| 6 | @pytest.mark.parametrize( |
| 7 | ("indata", "output"), |
| 8 | [ |
| 9 | ("a string 1\na string 2", "a string 1\na string 2"), |
| 10 | (b"some bytes 1\nsome bytes 2", "some bytes 1\nsome bytes 2"), |
| 11 | (1024, "1024"), |
| 12 | ], |
| 13 | ) |
| 14 | def test_ensure_str(indata, output): |
| 15 | assert ensure_str(indata) == output |