Skip to content

Commit

Permalink
Run Windows-1251 EAC log test only if charset-normalizer or chardet a…
Browse files Browse the repository at this point in the history
…re available
  • Loading branch information
phw committed May 1, 2024
1 parent c16a831 commit e5fddc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_disc_eaclog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2022 Laurent Monin
# Copyright (C) 2022 Philipp Wolfer
# Copyright (C) 2022, 2024 Philipp Wolfer
# Copyright (C) 2022 Jeffrey Bosboom
#
# This program is free software; you can redistribute it and/or
Expand All @@ -22,6 +22,7 @@


from typing import Iterator
import unittest

from test.picardtestcase import (
PicardTestCase,
Expand All @@ -36,6 +37,7 @@
NotSupportedTOCError,
TocEntry,
)
from picard.util import detect as charset_detect


test_log = (
Expand Down Expand Up @@ -72,6 +74,7 @@ def _test_toc_from_file(self, logfile):
toc = toc_from_file(test_log)
self.assertEqual((1, 8, 149323, 150, 25064, 43611, 60890, 83090, 100000, 115057, 135558), toc)

@unittest.skipUnless(charset_detect, "test requires charset_normalizer or chardet package")
def test_toc_from_file_eac_windows1251(self):
self._test_toc_from_file('eac-windows1251.log')

Expand Down

0 comments on commit e5fddc3

Please sign in to comment.