(encoding)
| 57 | |
| 58 | @pytest.mark.parametrize("encoding", ["utf-8", "ascii", "latin-1"]) |
| 59 | def test_same_encoding(encoding): |
| 60 | parser = GenericSubtitleParser(encoding=encoding) |
| 61 | offseter = SubtitleShifter(1) |
| 62 | pipe = make_pipeline(parser, offseter) |
| 63 | pipe.fit(BytesIO(fake_srt)) |
| 64 | assert parser.subs_._encoding == encoding |
| 65 | assert offseter.subs_._encoding == parser.subs_._encoding |
| 66 | assert offseter.subs_.set_encoding("same")._encoding == encoding |
| 67 | assert offseter.subs_.set_encoding("utf-8")._encoding == "utf-8" |
| 68 | |
| 69 | |
| 70 | @pytest.mark.parametrize("offset", [1, 1.5, -2.3]) |
nothing calls this directly
no test coverage detected