Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
import glob
import os.path

# Ensure options are loaded for all tests
import picard.options # noqa: F401


for filename in glob.glob(os.path.join(os.path.dirname(__file__), "test_*.py")):
__import__("test." + os.path.basename(filename)[:-3])
7 changes: 7 additions & 0 deletions test/test_coverart_details_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Option,
get_config,
)
from picard.i18n import setup_gettext

import pytest

Expand Down Expand Up @@ -62,6 +63,12 @@ def devicePixelRatio() -> float: # pragma: no cover - constant
return cast(QApplication, app)


@pytest.fixture(autouse=True)
def i18n_c_locale() -> None:
# Ensure deterministic number formatting
setup_gettext(None, 'C')


@dataclass
class DummyImage:
types_text: str
Expand Down
3 changes: 3 additions & 0 deletions test/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@


class TestI18n(PicardTestCase):
def tearDown(self):
setup_gettext(None, 'C')

def test_missing_locales(self):
tmplocaledir = tempfile.mkdtemp()

Expand Down
Loading