1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
import gc
import pytest
from pluginbase import PluginBase
@pytest.fixture(scope='function')
def base():
return PluginBase(package='dummy.plugins')
@pytest.fixture(scope='function')
def dummy_internal_name():
return 'pluginbase._internalspace._sp7bb7d8da1d24ae5a5205609c951b8be4'
@pytest.fixture(scope='function')
def source(base):
return base.make_plugin_source(searchpath=['./plugins'],
identifier='demo')
@pytest.fixture(scope='function', autouse=True)
def run_garbage_collection():
gc.collect()
try:
yield
finally:
gc.collect()
|