Verified Commit b5f59adb authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Make pytest-pacman fixtures scope session

The shared fixtures should be scoped session so consumers can define
their own desired scope.
parent b99ae327
Pipeline #1198 passed with stage
in 24 seconds
......@@ -72,7 +72,7 @@ def generate_syncdb(pkgs, dbfile):
def generate_localdb(tmpdir_factory):
'''Generates a localdb in provided location or when not provided pytest tmpdir
......@@ -10,13 +10,13 @@ import pytest
pytest_plugins = "pytest_pacman.plugin"
def core_data():
curpath = os.path.dirname(os.path.realpath(__file__))
return json.load(open(f'{curpath}/core.json'))
def localdb(tmpdir_factory, core_data, generate_localdb):
dbpath = str(tmpdir_factory.mktemp('dbpath'))
return generate_localdb(core_data, dbpath)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment