From 3f1bb68aa24e6ddc911651bad2d9d9bc071bda8c Mon Sep 17 00:00:00 2001 From: Felix Oesterle Date: Mon, 13 Jul 2026 20:53:32 +0200 Subject: [PATCH] fix(tests): update `test_getGeneralConfig` assertions to check structural properties only --- avaframe/tests/test_cfgUtils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/avaframe/tests/test_cfgUtils.py b/avaframe/tests/test_cfgUtils.py index c63a45069..b109f98a3 100644 --- a/avaframe/tests/test_cfgUtils.py +++ b/avaframe/tests/test_cfgUtils.py @@ -232,14 +232,14 @@ def test_getModuleConfigBatchCfgDirPriority(tmp_path): def test_getGeneralConfig(): '''Test for module getGeneralConfig''' - - # test with both a default and local .ini file + # test with both a default and local .ini file (if local_ exists) + # only assert structural properties - values depend on user's local_avaframeCfg.ini cfg = cfgUtils.getGeneralConfig() sections = cfg.sections() assert sections == ['MAIN', 'FLAGS'] - assert cfg['MAIN']['avalancheDir'] == 'data/avaParabola' - assert cfg['FLAGS']['savePlot'] == 'True' + assert cfg.has_option('MAIN', 'avalancheDir') + assert cfg.has_option('FLAGS', 'savePlot') assert cfg.has_option('FLAGS', 'showPlot') assert cfg.has_option('FLAGS', 'reportOneFile') assert cfg.has_option('MAIN', 'CPUPercent')