From ab95f714a65d6aafc351708ea618589769d4a369 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Wed, 6 Dec 2023 00:13:46 +0100 Subject: [PATCH] test missing config --- test/test_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_config.py b/test/test_config.py index fda6340..878cb43 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -45,6 +45,16 @@ def test_config_load_with_invalid_config(tmp_path): c.load(config_path=config_file) +def test_config_load_with_missing_config(tmp_path): + """Test the loading of a config that does not exist.""" + # test the config loading + from escpos import config + + c = config.Config() + with pytest.raises(escpos.exceptions.ConfigNotFoundError): + c.load(config_path=tmp_path) + + def test_config_load_from_appdir(): """Test the loading of a config in appdir.""" from escpos import config