tests: Run processes under test with G_DEBUG=fatal-warnings

Modify all the similar Python test wrappers to set
`G_DEBUG=fatal-warnings` in the environment of the program being tested,
so we can catch unexpected warnings/criticals.

Adding this because I noticed it was missing, not because I noticed a
warning/critical was being ignored.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
This commit is contained in:
Philip Withnall 2023-11-02 12:48:53 +00:00 committed by Philip Withnall
parent 120e0ee649
commit 077104e63b
5 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,7 @@ class TestCodegen(unittest.TestCase):
env = os.environ.copy()
env["LC_ALL"] = "C.UTF-8"
env["G_DEBUG"] = "fatal-warnings"
print("Environment:", env)
# We want to ensure consistent line endings...

View File

@ -63,6 +63,7 @@ class TestMessagesLowMemory(unittest.TestCase):
env = os.environ.copy()
env["LC_ALL"] = "C.UTF-8"
env["G_DEBUG"] = "fatal-warnings"
print("Environment:", env)
# We want to ensure consistent line endings...

View File

@ -88,6 +88,7 @@ class TestGenmarshal(unittest.TestCase):
env = os.environ.copy()
env["LC_ALL"] = "C.UTF-8"
env["G_DEBUG"] = "fatal-warnings"
print("Environment:", env)
# We want to ensure consistent line endings...

View File

@ -59,6 +59,7 @@ class TestGobjectQuery(unittest.TestCase):
env = os.environ.copy()
env["LC_ALL"] = "C.UTF-8"
env["G_DEBUG"] = "fatal-warnings"
print("Environment:", env)
# We want to ensure consistent line endings...

View File

@ -100,6 +100,7 @@ class TestMkenums(unittest.TestCase):
env = os.environ.copy()
env["LC_ALL"] = "C.UTF-8"
env["G_DEBUG"] = "fatal-warnings"
print("Environment:", env)
# We want to ensure consistent line endings...