[elbe-devel] [PATCH 9/9] tests: fail on warnings during unittesting

Thomas Weißschuh thomas.weissschuh at linutronix.de
Fri Jun 21 14:22:52 CEST 2024


This should allow us to handle upcoming issues proactively.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 conftest.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/conftest.py b/conftest.py
index c96af018da4b..a61e5511e930 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,3 +1,5 @@
+import os
+
 import pytest
 
 
@@ -15,6 +17,9 @@ def pytest_addoption(parser):
 def pytest_configure(config):
     config.addinivalue_line('markers', 'slow: mark test as slow to run')
 
+    # Make sure the setting is also propagated through run_elbe.
+    os.environ.setdefault('PYTHONWARNINGS', 'error')
+
 
 def pytest_collection_modifyitems(config, items):
     if config.getoption('--runslow'):

-- 
2.45.2



More information about the elbe-devel mailing list