Commit Graph
20 Commits
Author SHA1 Message Date
Šarūnas Nejus afa5bdaf97 Do not IncludeLazyConfig.log_sources while testing to reduce verbosity 2026-07-20 21:22:02 +01:00
Šarūnas Nejus 431b242f5f Use active stderr for CLI logging
Add a CLI log handler that resolves stderr when each record is emitted.

This avoids retaining temporary capture streams across repeated CLI runs.
2026-07-20 21:22:02 +01:00
Šarūnas Nejus 7cf8896597 Make the global config fixture function-scoped 2026-07-03 21:21:19 +01:00
Šarūnas Nejus 7c8924d8c9 Cache config.source in ConfigMixin for test speedup 2026-07-03 21:21:19 +01:00
Šarūnas Nejus 00501d3d7a Define class_helper, module_helper, session_helper fixtures 2026-06-17 18:56:27 +01:00
Šarūnas Nejus af27ed2ee6 Centralise RUNNING_IN_CI definition 2026-06-13 01:46:44 +01:00
Šarūnas Nejus 4f3ac5a40a Exclude artresizer tests when unavailable 2026-06-13 01:46:44 +01:00
Šarūnas Nejus d53ee774a9 Enable and fix flake8-return 2026-06-09 00:14:06 +01:00
Šarūnas Nejus 29580d2f00 Import everything from parent beets.autotag 2026-06-02 08:57:35 +01:00
Sebastian Mohr adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Šarūnas Nejus b683cb6540 Extend requires_import marker with force_ci option
Add force_ci kwarg to requires_import pytest marker to allow tests
to run unconditionally in CI (GitHub Actions), even if the module
is not detected locally. Refactor autobpm test to use this instead
of manual env-checking at module level.
2026-03-08 08:19:55 +00:00
Šarūnas Nejus 13ad15b83e Move pytest marker definitions to conftest.py
Replace static marker declarations in setup.cfg with dynamic
registration via pytest_configure hook in conftest.py.
2026-03-08 08:19:55 +00:00
Šarūnas Nejus a7325e7483 Skip langdetect-dependent tests when package is not installed
Add a `requires_import` pytest marker and `is_importable` fixture to
conditionally skip or adjust assertions based on whether optional
dependencies are available. Apply this to `langdetect`-dependent
language detection tests in lyrics and migration test suites.
2026-03-08 08:19:55 +00:00
Šarūnas Nejus 6a65f13776 Replace custom stdio mocks with pytest io fixture
Create a centralised pytest fixture to provide controllable stdin and
captured stdout in all tests. Simplify DummyIO/DummyIn and remove the
custom DummyOut implementation and make use of pytest builtin fixtures.

Create a centralised pytest fixture to provide controllable stdin and
captured stdout that can be applied to any tests, regardless whether
they are based on pytest or unittest.

* `io` fixture can be used as a fixture in pytest-based tests
* `IOMixin` can be used to attach `io` attribute to any test class,
  including `unittest.TestCase`
2026-02-10 00:53:20 +00:00
Šarūnas Nejus c807effeda Define a shared fixture for config 2025-12-27 14:30:35 +00:00
Šarūnas Nejus 5757579e27 Improve visibility of Distance tests failures 2025-10-10 20:36:33 +01:00
Šarūnas Nejus e6895bb52d Reset cached_classproperty cache for every test 2025-10-10 20:36:33 +01:00
Šarūnas Nejus 09b22949c0 Refactor test_query
And rewrite test_query.py
2025-07-06 16:15:30 +01:00
Šarūnas Nejus 35dcfe508a Configure integrated lyrics tests to only run on lyrics code changes 2025-01-19 01:48:03 +00:00
Šarūnas Nejus 11fa6c7b3f Introduce integration_test marker and update testing docs 2024-09-21 13:26:05 +01:00