Commit graph

2886 commits

Author SHA1 Message Date
Sebastian Mohr
59021add83 generate stubs 2025-08-21 19:18:23 +02:00
Šarūnas Nejus
c0675fefb8
Merge branch 'master' into multivalued-flexible-fields 2025-08-19 13:39:34 +01:00
Šarūnas Nejus
13080c17a3
Update release conversion logic accordingly 2025-08-10 16:25:05 +01:00
Šarūnas Nejus
2059a3a802
Move EventType definition to plugins.py and fix test_hook types 2025-08-09 15:44:35 +01:00
Šarūnas Nejus
54b31d01e9
Use only plugins/disabled_plugins config in plugin loading 2025-08-09 15:11:58 +01:00
Šarūnas Nejus
e9feb41709
Refactor plugin registration tests 2025-08-09 15:06:07 +01:00
Šarūnas Nejus
52bdb58a46
Simplify plugin loading mechanism
Centralise plugin loading in `beets.plugins` and refactor the plugin
loading system to be more straightforward and eliminate complex mocking
in tests. Replace the two-stage class collection and instantiation
process with direct instance creation and storage.

Add plugins.PluginImportError and adjust plugin import tests to only
complain about plugin import issues.
2025-08-09 15:06:06 +01:00
Šarūnas Nejus
788e31b619
Slightly simplify listener registration 2025-08-09 15:04:01 +01:00
Sebastian Mohr
c2d1bc3aaf
Add py.typed marker file to support PEP 561 typing (#5906)
Add `py.typed` marker file to support PEP 561 typing

This PR adds a `py.typed` marker file to the package directory to
indicate that the package includes inline type hints and is PEP 561
compliant.
2025-08-09 13:31:55 +02:00
Sebastian Mohr
3f23f35353 Removed duplicate importlib import. 2025-08-09 13:17:27 +02:00
Sebastian Mohr
84ae11657e Added a check for gstream plugin issues on windows. 2025-08-09 13:17:27 +02:00
Sebastian Mohr
1696789cbe Removed re and added brackets 2025-08-09 13:17:27 +02:00
Sebastian Mohr
a2136e1100 Removed now unused _is_spec_avilable function 2025-08-09 13:17:27 +02:00
Sebastian Mohr
8d134d1389 Skip module not found checks in favor for only running the test in
the ci.
2025-08-09 13:17:27 +02:00
Sebastian Mohr
586b89016b Using fixture to unload plugins. Enhance comment. Simplified get available
plugins function.
2025-08-09 13:17:27 +02:00
Sebastian Mohr
8b0af15b83 Use load_plugins directly as the plugin mixin version wants
to create an instance which is not wanted here.
2025-08-09 13:17:27 +02:00
Sebastian Mohr
3a2b6d85a4 Using plugin mixin to unload plugins. 2025-08-09 13:17:27 +02:00
Sebastian Mohr
8aa298d646 Added module cleanup, might fix errors. 2025-08-09 13:17:27 +02:00
Sebastian Mohr
4723f3de7d Instead of trying to import all plugins together, opted to test
one plugin at a time.
2025-08-09 13:17:27 +02:00
Sebastian Mohr
cfab2eb56e Some typos 2025-08-09 13:17:27 +02:00
Sebastian Mohr
355e4d3fed Added a load all plugins test. 2025-08-09 13:17:27 +02:00
Maxr1998
8db661b115
Add test 2025-07-16 21:46:03 +02:00
Šarūnas Nejus
3be4a89aee
refactor: convert _types from class attributes to cached properties
Convert static _types dictionaries to dynamic cached class properties to
enable proper plugin type inheritance and avoid mutating shared state.

Key changes:
- Replace static _types dicts with @cached_classproperty decorators
- Update cached_classproperty to support proper caching with class names
- Remove manual _types mutation in plugin loading/unloading
- Add pluginload event and cache clearing for proper plugin integration
- Fix test to trigger type checking during item creation

This ensures plugin types are properly inherited through the class
hierarchy and eliminates issues with shared mutable state between
test runs.
2025-07-16 14:45:25 +01:00
Šarūnas Nejus
e1162b7e0f
Rename test_player -> test_bpd 2025-07-16 14:06:35 +01:00
Šarūnas Nejus
a5bbe57490
Fix types in test_player 2025-07-16 14:06:34 +01:00
Šarūnas Nejus
21459c70ee
importer: provides search_ids into lookup_candidates explicitly 2025-07-16 14:06:33 +01:00
Sebastian Mohr
178e27f11f Fixed imports for all tests and added a bit of stricter type checking. 2025-07-15 15:03:14 +02:00
Šarūnas Nejus
0dd6cb3b6d
Replace assert_equal_path 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
ca3adfe525
Replace assertPrem 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
8dcc69e6d8
Replace _assert_image_operated 2025-07-09 09:21:52 +01:00
Šarūnas Nejus
9f6d5063d1
Replace _assertImageIsValidArt 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
72caf0d2cd
Replace assertCount 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
111cb562ea
Replace assertContains and assertExcludes 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
3c8179a762
Replace assertAlbumImport 2025-07-09 09:21:51 +01:00
Šarūnas Nejus
c6b5b3bed3
Replace assertFileTag and assertNoFileTag 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
43b8cce063
Replace assertIsDir 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
ca4fa6ba10
Replace assertIsFile 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
038843cdb2
Replace assertAlmostEqual and assertEqualTimes 2025-07-09 09:21:50 +01:00
Šarūnas Nejus
e36e8f1f51
Remove assert_file_in_lib 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
452644bbf3
Remove assert_lib_dir_empty 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
e6d5f73964
Use pathlib.Path in test_convert 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
31dbd51222
Replace assertExists and assertNotExist 2025-07-09 09:21:49 +01:00
Šarūnas Nejus
c706f62fb2
Replace assertExists in test_files 2025-07-09 09:21:48 +01:00
Šarūnas Nejus
e40c7fd71c
Introduce Album.art_filepath to simplify existence checks 2025-07-09 09:21:47 +01:00
Šarūnas Nejus
d017270196
Use pathlib.Path in test_smartplaylist.py 2025-07-09 09:17:14 +01:00
Šarūnas Nejus
edd3df99ba
Introduce TestHelper.temp_dir_path 2025-07-09 09:17:14 +01:00
Šarūnas Nejus
9e4b117454
Speed up tests that only need IOMixin 2025-07-09 09:17:13 +01:00
Šarūnas Nejus
605cea9bdc
Rip away io stuff from TestHelper to IOMixin 2025-07-09 09:17:13 +01:00
Šarūnas Nejus
7cada1c9f8
Remove no-op decargs 2025-07-08 11:37:33 +01:00
Šarūnas Nejus
09b22949c0
Refactor test_query
And rewrite test_query.py
2025-07-06 16:15:30 +01:00