mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 04:08:12 +02:00
linux: Create an empty configuration file for every test
This avoids a warning during startup, allowing enabling fatal-warnings in more cases.
This commit is contained in:
parent
0a1edd7916
commit
f2da5678f3
1 changed files with 3 additions and 2 deletions
|
|
@ -188,8 +188,9 @@ class Tests(dbusmock.DBusTestCase):
|
|||
When done, this sets self.proxy as the Gio.DBusProxy for upowerd.
|
||||
'''
|
||||
env = os.environ.copy()
|
||||
if cfgfile is not None:
|
||||
env['UPOWER_CONF_FILE_NAME'] = cfgfile
|
||||
if not cfgfile:
|
||||
_, cfgfile = tempfile.mkstemp(prefix='upower-cfg-')
|
||||
self.addCleanup(os.unlink, cfgfile)
|
||||
env['G_DEBUG'] = 'fatal-criticals'
|
||||
# note: Python doesn't propagate the setenv from Testbed.new(), so we
|
||||
# have to do that ourselves
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue