From 6b5fbfd07a6f3ec1415fead9c1e339e28a8afcb6 Mon Sep 17 00:00:00 2001 From: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:29:23 -0600 Subject: [PATCH] Fix path issue with field_table (#527) Wrap the field table string in Path() to make the filecopy task happy. --- src/uwtools/drivers/fv3.py | 2 +- src/uwtools/tests/drivers/test_fv3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uwtools/drivers/fv3.py b/src/uwtools/drivers/fv3.py index 816c95fab..6d6647376 100644 --- a/src/uwtools/drivers/fv3.py +++ b/src/uwtools/drivers/fv3.py @@ -67,7 +67,7 @@ def field_table(self): yield self._taskname(fn) path = self._rundir / fn yield asset(path, path.is_file) - yield filecopy(src=self._driver_config["field_table"]["base_file"], dst=path) + yield filecopy(src=Path(self._driver_config["field_table"]["base_file"]), dst=path) @tasks def files_copied(self): diff --git a/src/uwtools/tests/drivers/test_fv3.py b/src/uwtools/tests/drivers/test_fv3.py index 939f6bc13..59fde2e22 100644 --- a/src/uwtools/tests/drivers/test_fv3.py +++ b/src/uwtools/tests/drivers/test_fv3.py @@ -132,7 +132,7 @@ def test_FV3_field_table(driverobj): src.touch() dst = driverobj._rundir / "field_table" assert not dst.is_file() - driverobj._driver_config["field_table"] = {"base_file": src} + driverobj._driver_config["field_table"] = {"base_file": str(src)} driverobj.field_table() assert dst.is_file()