MCPcopy Create free account
hub / github.com/smacke/ffsubsync / test_same_encoding

Function test_same_encoding

tests/test_subtitles.py:59–67  ·  view source on GitHub ↗
(encoding)

Source from the content-addressed store, hash-verified

57
58@pytest.mark.parametrize("encoding", ["utf-8", "ascii", "latin-1"])
59def 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])

Callers

nothing calls this directly

Calls 5

SubtitleShifterClass · 0.90
make_pipelineFunction · 0.90
fitMethod · 0.45
set_encodingMethod · 0.45

Tested by

no test coverage detected