def test_unicode(): screen = Screen(4, 2) stream = Stream() stream.attach(screen) try: stream.feed("тест") except UnicodeDecodeError: pytest.fail("Check your code -- we do accept unicode.") assert screen.display == ["тест", " "]