()
| 22 | |
| 23 | |
| 24 | def test_to_unicode(): |
| 25 | # type: () -> None |
| 26 | assert isinstance(to_unicode(""), unicode_string) |
| 27 | assert isinstance(to_unicode("abc"), unicode_string) |
| 28 | assert isinstance(to_unicode(b"abc"), unicode_string) |
| 29 | assert isinstance(to_unicode(u"abc"), unicode_string) |
| 30 | assert isinstance(to_unicode(u"abc".encode("latin-1"), encoding=u"latin-1"), unicode_string) |
| 31 | |
| 32 | for bad_value in (123, None): |
| 33 | with pytest.raises(ValueError): |
| 34 | to_unicode(bad_value) # type: ignore[type-var] |
| 35 | |
| 36 | |
| 37 | def test_indent(): |
nothing calls this directly
no test coverage detected