Commit graph

87 commits

Author SHA1 Message Date
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
Šarūnas Nejus
509cbdcbe4
Move sanitize_pairs/choices from plugins to util module 2025-05-31 17:55:41 +01:00
Šarūnas Nejus
b520981c9c
plugins: restructure id extraction 2025-05-17 14:57:34 +01:00
Sebastian Mohr
a2e316d444 Merge remote-tracking branch 'upstream/master' into importer-restructure 2025-05-17 10:32:50 +02:00
Šarūnas Nejus
4fc9f0c3d6
Centralize AutotagStub test setup into AutotagImportTestCase 2025-05-17 03:31:58 +01:00
Sebastian Mohr
68acaa6470 Renamed all action occurrences with Action. 2025-05-13 13:01:46 +02:00
Šarūnas Nejus
c490ac5810
Fix formatting 2025-05-07 10:41:01 +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
Šarūnas Nejus
4b69b493d2
Use f-string syntax 2024-08-16 17:47:23 +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
f042f5ad32
Leave a single source of truth for importer setup 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
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
2d5fd907c3
Remove redundant setup_beets and teardown_beets instructions 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
Šarūnas Nejus
8373181e02
Create PluginImportTestCase in test_plugins
This involves making EventsTest use _create_import_dir from TestHelper.
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
6c1e26acc9
Replace unittest.TestCase, TestHelper by BeetsTestCase 2024-07-28 18:58:34 +01:00
Šarūnas Nejus
82b1a0d01f
test_plugins.py: dedupe setUp, tearDown usage
And most importantly, remove a redudant invocation of `setup_beets`
which left temporary directories hanging around without getting cleaned
up.
2024-07-12 20:32:18 +01:00
freddiewanah
e0de6e1b89 refactor the test methods to avoid suboptimal asserts. 2024-04-08 21:39:25 +08:00
Lars Kruse
508d28f66b tests: move reusable test-related modules into the beets package
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
2024-01-15 19:40:57 +01:00
Lars Kruse
2b99c12430 tests: move TerminalImportSessionSetup from tests.test_ui_importer to test.helper
This class is imported by some other test modules.
Thus, it should reside in a module, which is obviously used by other
tests.
2024-01-15 19:40:57 +01:00
Lars Kruse
7707e23456 tests: move reusable components from test.test_importer to test.helper
`ImportHelper` and `AutotagStub` are used in many tests.
Thus, they should reside in a module which is obviously used by multiple
tests.
2024-01-15 19:40:57 +01:00
Serene-Arc
a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Adrian Sampson
cc0979692b
Better mocking for getfullargspec
Seems much more straightforward this way?
2023-10-20 17:36:21 -04:00
Adrian Sampson
a9e1b607c5
Fix inspect mocking
File this under "I have no idea how this *ever* worked"...
2023-10-20 17:07:35 -04:00
luzpaz
8419149c7a
Fix various typos 2023-08-09 21:26:15 -04:00
wisp3rwind
1ef6b90786 add missing syspath conversions (1/3, tests)
these are mostly in the tests, which didn't cause issues since the
affected directories usually have nice ASCII paths. For consistency, it
is nicer to always invoke syspath. That also avoids deprecation warnings
for the bytestring interfaces on Python <= 3.5. The bytestring
interfaces were undeprecated with PEP 529 in Python 3.6, such that we
didn't observe any actual failures.
2023-06-24 14:52:46 +02:00
J0J0 Todos
c6746ed399 Add a test for Beatport ID extraction 2023-03-08 18:29:04 +01:00
J0J0 Todos
af600497ee Add a test for Deezer ID extraction 2023-03-08 18:28:41 +01:00
J0J0 Todos
c1299f64a1 Add a test for Spotify metadata ID extraction 2023-03-08 18:22:54 +01:00