# Return a new context
return pakfire.Ctx(path=path, **kwargs)
- def setup_pakfire(self, ctx=None, path=None, **kwargs):
+ def setup_pakfire(self, ctx=None, path=None, config=None, **kwargs):
"""
Sets up a new Pakfire environment
"""
if ctx is None:
ctx = self.setup_ctx()
+ if config is None:
+ config = os.environ.get("TEST_CONFIG_FILE")
+
if path is None:
path = os.environ.get("TEST_STUB_ROOT")
- return pakfire.Pakfire(ctx=ctx, path=path, **kwargs)
+ with open(config, "r") as f:
+ return pakfire.Pakfire(ctx=ctx, path=path, conf=f, **kwargs)
def path(self, *args, **kwargs):
"""