Nicholas Boyd Isacsson
ffdc3f73ab
Revert configuration format changes
2024-10-14 22:54:38 +02:00
Nicholas Boyd Isacsson
195644fc46
Refactor according to review comments
2024-10-12 15:34:05 +02:00
Nicholas Boyd Isacsson
913d51af5c
Preserve rule order in substitute configuration
2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
876dcb9bee
Fix substitute test formatting
2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
16ac231f7f
Refactor substitute tests
2024-10-05 15:51:41 +02:00
Nicholas Boyd Isacsson
81b79a08c1
Add test cases for substitute plugin
2024-10-05 15:51:41 +02:00
Karl Besser
37879d0b18
Remove redundant unit tests for ftintitle plugin
...
Remove redundant unit tests for the `ftintitle.cotains_feat` function
2024-10-01 15:55:38 -05:00
Karl Besser
669307c91c
Update ftintitle.contains_feat unit tests
...
Since the `for_artist` keyword has been removed from
`ftintitle.contains_feat`, the unit tests need to be updated.
This includes the deletion of the test cases that test the
`for_artist=True` delimiters.
2024-09-30 10:28:23 -05:00
Karl Besser
6cb2e5926b
Add unit tests for separate "feat. X" detection
...
The unit tests for the `ftintitle.contains_feat` function are now split
up for artist and title matching.
2024-09-26 17:22:25 -04:00
Karl Besser
6c8bd424e8
Add unit tests to test new feat. X detection regex
...
The previous version of the `plugins.feat_tokens` regular expression
only matched "feat. X" parts if preceded by a space. This caused missed
detections in the `ftintitle.contains_feat` function.
This commit adds unit tests for the updated regex that also matches
"feat. X" parts within parentheses and brackets
2024-09-22 18:30:28 -04:00
Šarūnas Nejus
11fa6c7b3f
Introduce integration_test marker and update testing docs
2024-09-21 13:26:05 +01:00
Šarūnas Nejus
5f78d1b82b
Remove some lint exclusions and fix the issues
...
* Replace `noqa` comments in `assert...` method definitions with
a configuration option to ignore these names.
* Use the `__all__` variable to specify importable items from the
module, replacing `*` imports and `noqa` comments for unused imports.
* Address issues with poorly named variables and methods by renaming
them appropriately.
2024-09-21 11:59:19 +01:00
Šarūnas Nejus
f36bc497c8
Fix lint issues
...
- Fix imports
- Fix pytest issues
- Do not assign lambda as variable
- Use isinstance instead of type to check type
- Rename ambiguously named variables
- Name custom errors with Error suffix
2024-09-21 11:59:18 +01:00
Šarūnas Nejus
85a17ee503
Reformat the codebase
2024-09-21 11:57:48 +01:00
Konstantin
796c9addfb
Fixes TypeError in the Discogs plugin ( #5415 )
...
Handles the case when discogs return `None` for format descriptions.
---------
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-09-19 21:27:16 +01:00
Šarūnas Nejus
5785522170
fetchart: defer file removal config option evaluation ( #5244 )
...
Defer the evaluation of the source file removal options (`import.delete`
and `import.move`) to the point where the fetchart plugin is actually
called instead of only evaluating those configuration options on plugin
initialization.
This is to allow other plugins (such as the
[ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194 )
plugin) to invoke the import directly (within the same python process;
implicitly invoking the fetchart plugin) with temporarily overwritten
configuration options.
Addresses
https://github.com/beetbox/beets/issues/5167#issuecomment-2106465172
2024-09-16 11:44:46 +01:00
Karl-Ludwig Besser
39acba5200
Merge branch 'master' into ftintitle_keep_artist
2024-09-05 12:32:20 +02:00
Šarūnas Nejus
111686e563
autobpm: add tests
2024-08-19 22:44:17 +01:00
Šarūnas Nejus
4b69b493d2
Use f-string syntax
2024-08-16 17:47:23 +01:00
Šarūnas Nejus
d3bdd93bf6
Replace assertAlmostEqual
2024-08-12 08:49:30 +01:00
Šarūnas Nejus
fcc4d8481d
Replace assertListEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
fdb8c28271
Replace assertCountEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
46bdb84b46
Replace assertGreater and assertGreaterEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
eda0ef11d6
Replace assertIsInstance
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
f9359df0d1
Replace assertNotEqual
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
847e3858a6
Replace assertRaises
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
9a05d27acf
Replace assertEqual
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
6631b6aef6
Replace assertNotIn
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
11e948121c
Replace assertIn
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
2616bcc950
Replace assertIsNotNone
2024-08-12 08:43:41 +01:00
Šarūnas Nejus
5d4911e905
Replace assertIsNone
2024-08-12 08:43:41 +01:00
Šarūnas Nejus
cb82917fe0
Replace assertFalse
2024-08-12 08:43:41 +01:00
Šarūnas Nejus
0ecc345143
Replace assertTrue
2024-08-05 17:11:16 +01:00
Šarūnas Nejus
5f395ab4f4
Configure plugins using PluginMixin.configure_plugin
2024-07-29 15:33:12 +01:00
Šarūnas Nejus
199f3079f2
Use PluginMixin in tests that load plugins manually
...
A constant `preload_plugin` is used to disable loading the plugin in the
`setUp` initialisation, allowing the plugin to be loaded manually by the
tests.
Also added a cleanup instruction to remove listeners from configured
plugins, and removed this logic from several tests.
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
e097f1a8c6
Rewrite FileFilterPluginTest
...
And rewrite the tests since they were far too confusing to follow.
2024-07-28 18:58:54 +01:00
Šarūnas Nejus
8d85cfd72a
Define AsIsImporterMixin to run autotag=False importer
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
f042f5ad32
Leave a single source of truth for importer setup
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
8065ff0461
Split album and singleton tests in edit and filefilter
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
7e444db914
Rename _create_import_dir -> prepare_album_for_import
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
c2fdf9873d
Synchronise ImportHelper._create_import_dir and TestHelper.create_importer implementations
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
41bbb77a0b
Centralise 'import_dir' creation
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
1f8466f04a
Move create_importer to ImportHelper
2024-07-28 18:58:53 +01:00
Šarūnas Nejus
fcff5d72af
Remove def suite TestLoader definitions
2024-07-28 18:58:51 +01:00
Šarūnas Nejus
432da560e4
Create PluginTestCase to dedupe plugin setup
2024-07-28 18:58:35 +01:00
Šarūnas Nejus
16cf8dd937
Centralize db setup on disk
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
7d7f16395c
Remove redundant library setUp instructions
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
2d5fd907c3
Remove redundant setup_beets and teardown_beets instructions
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
b64eaeda0a
Rename LibTestCase to ItemInDBTestCase
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
91099d362e
Deduplicate TerminalImportHelper and rename to TerminalImportMixin
2024-07-28 18:58:34 +01:00