From 324cfa3b7258fc0f26550a57cf7dbdb66035e4b5 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 14 Nov 2023 16:27:52 -0500 Subject: [PATCH] test inializing Forcing and Routing models with non-existant config files --- python/ngen_conf/tests/test_forcing.py | 6 ++++++ python/ngen_conf/tests/test_routing.py | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 python/ngen_conf/tests/test_forcing.py create mode 100644 python/ngen_conf/tests/test_routing.py diff --git a/python/ngen_conf/tests/test_forcing.py b/python/ngen_conf/tests/test_forcing.py new file mode 100644 index 00000000..a1909234 --- /dev/null +++ b/python/ngen_conf/tests/test_forcing.py @@ -0,0 +1,6 @@ +from ngen.config.configurations import Forcing + + +def test_initialize_forcing_with_non_existant_path(): + o = Forcing(path="some-fake-path.csv", provider=Forcing.Provider.CSV) + assert not o.path.exists() diff --git a/python/ngen_conf/tests/test_routing.py b/python/ngen_conf/tests/test_routing.py new file mode 100644 index 00000000..66ca403a --- /dev/null +++ b/python/ngen_conf/tests/test_routing.py @@ -0,0 +1,6 @@ +from ngen.config.configurations import Routing + + +def test_initialize_routing_with_non_existant_path(): + o = Routing(t_route_config_file_with_path="some-fake-path.csv") + assert not o.config.exists()