tkarabela / pysubs2

A Python library for editing subtitle files
http://pysubs2.readthedocs.io
MIT License
318 stars 40 forks source link

[QA] DeprecationWarning in tests: 'alignment' attribute should be an Alignment instance #61

Closed NicolaSmaniotto closed 1 year ago

NicolaSmaniotto commented 2 years ago

Pytest prints a warning:

tests/test_substation.py::test_alignment_given_as_integer
  /var/tmp/portage/dev-python/pysubs2-1.6.0/work/pysubs2-1.6.0/pysubs2/substation.py:333: DeprecationWarning: The 'alignment' attribute of SSAStyle should be an Alignment instance, using plain int is deprecated
    warnings.warn("The 'alignment' attribute of SSAStyle should be an Alignment instance, using plain int is deprecated", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Python version: 3.10.8 Pytest version: 7.1.3