Closed yurivict closed 6 months ago
Failures look like this:
______________________________________________________________________________________________ test_file_ending_with_font_section ______________________________________________________________________________________________ def test_file_ending_with_font_section(): > subs = SSAFile.load(FONT_SUBS_NO_EVENTS_PATH) tests/test_attachment.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = <class 'pysubs2.ssafile.SSAFile'>, path = '/usr/ports/multimedia/py-pysubs2/work-py39/pysubs2-1.6.1/tests/data/subtitle_with_attached_fonts_no_events.ass', encoding = 'utf-8', format_ = None, fps = None, kwargs = {} @classmethod def load(cls, path: str, encoding: str="utf-8", format_: Optional[str]=None, fps: Optional[float]=None, **kwargs) -> "SSAFile": """ Load subtitle file from given path. This method is implemented in terms of :meth:`SSAFile.from_file()`. See also: Specific formats may implement additional loading options, please refer to documentation of the implementation classes (eg. :meth:`pysubs2.subrip.SubripFormat.from_file()`) Arguments: path (str): Path to subtitle file. encoding (str): Character encoding of input file. Defaults to UTF-8, you may need to change this. format_ (str): Optional, forces use of specific parser (eg. `"srt"`, `"ass"`). Otherwise, format is detected automatically from file contents. This argument should be rarely needed. fps (float): Framerate for frame-based formats (MicroDVD), for other formats this argument is ignored. Framerate might be detected from the file, in which case you don't need to specify it here (when given, this argument overrides autodetection). kwargs: Extra options for the reader. Returns: SSAFile Raises: IOError UnicodeDecodeError pysubs2.exceptions.UnknownFPSError pysubs2.exceptions.UnknownFormatIdentifierError pysubs2.exceptions.FormatAutodetectionError Note: pysubs2 may autodetect subtitle format and/or framerate. These values are set as :attr:`SSAFile.format` and :attr:`SSAFile.fps` attributes. Example: >>> subs1 = pysubs2.load("subrip-subtitles.srt") >>> subs2 = pysubs2.load("microdvd-subtitles.sub", fps=23.976) >>> subs3 = pysubs2.load("subrip-subtitles-with-fancy-tags.srt", keep_unknown_html_tags=True) """ > with open(path, encoding=encoding) as fp: E FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/multimedia/py-pysubs2/work-py39/pysubs2-1.6.1/tests/data/subtitle_with_attached_fonts_no_events.ass'
Version: 1.6.1 Python-3.9 FreeBSD 13.2
Fixed in version 1.7.0.
Failures look like this:
Version: 1.6.1 Python-3.9 FreeBSD 13.2