@@ -570,6 +570,11 @@ def cleanup(self):
570
570
yield
571
571
self .unimport_plugins ()
572
572
573
+ @pytest .mark .skipif (
574
+ os .environ .get ("GITHUB_ACTIONS" ) != "true" ,
575
+ reason = "Requires all dependencies to be installed, "
576
+ + "which we can't guarantee in the local environment." ,
577
+ )
573
578
@pytest .mark .parametrize ("plugin_name" , get_available_plugins ())
574
579
def test_import_plugin (self , caplog , plugin_name ): #
575
580
"""Test that a plugin is importable without an error using the
@@ -581,22 +586,9 @@ def test_import_plugin(self, caplog, plugin_name): #
581
586
582
587
# Check for warnings, is a bit hacky but we can make full use of the beets
583
588
# load_plugins code that way
584
- # We skip ModuleNotFoundError to allow local pytest runs to pass if plugin
585
- # dependencies are not installed e.g. librosa for autobpm
586
- records = []
587
- pattern = r"ModuleNotFoundError: No module named '(.*?)'"
588
- for record in caplog .records :
589
- match = re .search (pattern , str (record ))
590
- if match :
591
- module_name = match .group (1 )
592
- if not self ._is_spec_available (module_name ):
593
- # If the module is not found, we skip it
594
- continue
595
- records .append (record )
596
-
597
- assert len (records ) == 0 , (
589
+ assert len (caplog .records ) == 0 , (
598
590
f"Plugin '{ plugin_name } ' has issues during import. " ,
599
- records ,
591
+ caplog . records ,
600
592
)
601
593
602
594
def _is_spec_available (self , spec_name ):
0 commit comments