diff --git a/idaes/apps/grid_integration/examples/utils.py b/idaes/apps/grid_integration/examples/utils.py index b3afe3d74f..a20a07cdb7 100644 --- a/idaes/apps/grid_integration/examples/utils.py +++ b/idaes/apps/grid_integration/examples/utils.py @@ -18,9 +18,6 @@ import pandas as pd -# with resources.path("idaes.tests.prescient.5bus", "__init__.py") as pkg_file: -# prescient_5bus = Path(pkg_file).parent - with resources.as_file(resources.files("idaes.tests.prescient.5bus").joinpath("__init__.py")) as pkg_file: prescient_5bus = Path(pkg_file).parent diff --git a/idaes/apps/grid_integration/tests/test_integration.py b/idaes/apps/grid_integration/tests/test_integration.py index 57c964a24c..b36ddb5d8f 100644 --- a/idaes/apps/grid_integration/tests/test_integration.py +++ b/idaes/apps/grid_integration/tests/test_integration.py @@ -77,11 +77,6 @@ def self_scheduler_output_dir(self, tmp_path: Path) -> Path: @pytest.fixture def self_scheduler_plugin_path(self) -> Path: - # with resources.path( - # "idaes.apps.grid_integration.tests", - # "self_scheduler_integration_test_plugin.py", - # ) as p: - # return Path(p) with resources.as_file(resources.files("idaes.apps.grid_integration.tests").joinpath("self_scheduler_integration_test_plugin.py")) as p: return Path(p) diff --git a/idaes/tests/prescient/test_prescient.py b/idaes/tests/prescient/test_prescient.py index 1cde47e3fb..09cef146c4 100644 --- a/idaes/tests/prescient/test_prescient.py +++ b/idaes/tests/prescient/test_prescient.py @@ -33,9 +33,6 @@ def data_path(self) -> Path: # we need to specify __init__.py as a workaround for Python 3.9, # where importlib.resources.path() requires the resource to be a file # directories are not supported and will raise an error if attempted - #with resources.path("idaes.tests.prescient.5bus", "__init__.py") as pkg_file: - # return Path(pkg_file).parent - with resources.as_file(resources.files("idaes.tests.prescient.5bus").joinpath("__init__.py")) as pkg_file: prescient_5bus = Path(pkg_file).parent