mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-22 07:30:06 +01:00
tests/lib/testprogramrunner: Support overriding the environment
This commit is contained in:
parent
044e77a384
commit
fe25e4aad5
@ -98,7 +98,12 @@ class TestProgramRunner(unittest.TestCase):
|
||||
print("tmpdir:", self.tmpdir.name)
|
||||
|
||||
def runTestProgram(
|
||||
self, *args, should_fail=False, timeout_seconds=10, wrapper_args=[]
|
||||
self,
|
||||
*args,
|
||||
should_fail=False,
|
||||
timeout_seconds=10,
|
||||
wrapper_args=[],
|
||||
environment={},
|
||||
) -> Result:
|
||||
argv = [self.__program]
|
||||
|
||||
@ -114,6 +119,7 @@ class TestProgramRunner(unittest.TestCase):
|
||||
env = os.environ.copy()
|
||||
env["LC_ALL"] = "C.UTF-8"
|
||||
env["G_DEBUG"] = "fatal-warnings"
|
||||
env.update(environment)
|
||||
|
||||
print("Running:", argv)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user