Skip to content

Commit

Permalink
Merge pull request #8 from Open-ISP/test-all-configs
Browse files Browse the repository at this point in the history
Test all configs
  • Loading branch information
prakaa authored Aug 21, 2024
2 parents 2245229 + a88d372 commit a1e04a9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
5 changes: 0 additions & 5 deletions src/isp_table_configs/5.2/capacity_factors.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions src/isp_table_configs/5.2/outages.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions src/isp_table_configs/5.2/retirement.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions tests/test_packaged_table_configs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest
from isp_workbook_parser import Parser
from pathlib import Path

workbook_path = Path("workbooks")


@pytest.mark.parametrize("workbook_version_folder", workbook_path.iterdir())
def test_packaged_table_configs_for_each_version(workbook_version_folder: Path):
xl_file = [file for file in workbook_version_folder.glob("*.xls*")]
assert (
len(xl_file) == 1
), f"There should only be one Excel workbook in each version sub-directory, got {xl_file}"
workbook_name = xl_file.pop()
workbook = Parser(workbook_name)
configs = workbook.get_table_names()
for config in configs:
workbook.get_table(config, config_checks=True)
Binary file removed workbooks/5.2/2023 IASR Assumptions Workbook.xlsx
Binary file not shown.
Binary file not shown.

0 comments on commit a1e04a9

Please sign in to comment.