aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_config.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-28 10:24:48 +0100
committerDanilo M. <danix@danix.xyz>2026-10-28 10:24:48 +0100
commit34d6ca51955fc2a10de326de5d2ac8f81cf660bb (patch)
treec9249c42cf90f859404a3af7d1ab76541c6340e4 /tests/test_config.py
parent8431493b1de912196ea66b9f27c89e4c68658d56 (diff)
downloadgenerat3D-34d6ca51955fc2a10de326de5d2ac8f81cf660bb.tar.gz
generat3D-34d6ca51955fc2a10de326de5d2ac8f81cf660bb.zip
Fail loudly on unreadable config and empty library roots
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index d1ad0d2..72ed0f6 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -79,3 +79,12 @@ class ConfigTest(unittest.TestCase):
del os.environ["XDG_CONFIG_HOME"]
else:
os.environ["XDG_CONFIG_HOME"] = old
+
+ def test_unreadable_config_is_fatal(self):
+ self.cfg.mkdir()
+ with self.assertRaisesRegex(Error, "config.toml"):
+ library_roots([], self.cfg)
+
+ def test_empty_library_root_is_fatal(self):
+ with self.assertRaisesRegex(Error, "empty library root"):
+ library_roots([""], self.cfg)