Skip to content

Commit a1f3c70

Browse files
committed
Add regression test for empty .cbi/config file
Signed-off-by: John Pennycook <[email protected]>
1 parent 566a0a6 commit a1f3c70

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/compilers/test_compilers.py

+10
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,16 @@ def test_unrecognized(self):
422422

423423
tmp.cleanup()
424424

425+
def test_empty_config(self):
426+
"""Check that we ignore empty configuration files."""
427+
tmp = tempfile.TemporaryDirectory()
428+
path = Path(tmp.name)
429+
os.chdir(tmp.name)
430+
os.mkdir(".cbi")
431+
open(path / ".cbi" / "config", mode="w").close()
432+
config._load_compilers()
433+
tmp.cleanup()
434+
425435

426436
if __name__ == "__main__":
427437
unittest.main()

0 commit comments

Comments
 (0)