Exemplo n.º 1
0
        def test_good_package(self, tmp_path, config):
            plugin_dir = tmp_path / "plugin"
            plugin_dir.mkdir()

            (plugin_dir / "__init__.py").touch()
            (plugin_dir / "__main__.py").touch()

            config.PLUGIN_ENTRY = "-m plugin"

            ConfigLoader._entry_point(config, tmp_path)
Exemplo n.º 2
0
 def test_good_file(self, tmp_path, config, entry_point):
     assert ConfigLoader._entry_point(config, tmp_path) is None
Exemplo n.º 3
0
 def test_not_a_file(self, tmp_path, config):
     # Not having the entry_point fixture makes this fail
     with pytest.raises(PluginValidationError):
         ConfigLoader._entry_point(config, tmp_path)