Skip to content

Commit

Permalink
reran by using the black formatter itself -- should be good now
Browse files Browse the repository at this point in the history
  • Loading branch information
azaidi06 committed Dec 13, 2024
1 parent 02c1b49 commit 8d2d4f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions idaes/apps/grid_integration/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ 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

fname = "idaes.tests.prescient.5bus"
py_fname = "__init__.py"
with as_file(files(fname).joinpath(py_fname)) as pkg_file:
with as_file(
files("idaes.tests.prescient.5bus").joinpath("__init__.py")
) as pkg_file:
prescient_5bus = Path(pkg_file).parent


@pytest.mark.unit
def test_data_path_available(self, data_path: Path):
assert data_path.is_dir()
Expand All @@ -75,9 +73,11 @@ def self_scheduler_output_dir(self, tmp_path: Path) -> Path:

@pytest.fixture
def self_scheduler_plugin_path(self) -> Path:
fname = "idaes.apps.grid_integration.tests"
py_fname = "self_scheduler_integration_test_plugin.py"
with as_file(files(fname).joinpath(py_fname)) as p:
with as_file(
files("idaes.apps.grid_integration.tests").joinpath(
"self_scheduler_integration_test_plugin.py"
)
) as p:
return Path(p)

@pytest.mark.unit
Expand Down
6 changes: 3 additions & 3 deletions idaes/tests/prescient/test_prescient.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ 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
fname = "idaes.tests.prescient.5bus"
py_fname = "__init__.py"
with as_file(files(fname).joinpath(py_fname)) as pkg_file:
with as_file(
files("idaes.tests.prescient.5bus").joinpath("__init__.py")
) as pkg_file:
prescient_5bus = Path(pkg_file).parent

@pytest.mark.unit
Expand Down

0 comments on commit 8d2d4f5

Please sign in to comment.