Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue253 coverage #564

Merged
merged 9 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions buildingspy/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ BuildingsPy Changelog
Version 5.2.0, xxxx
^^^^^^^^^^^^^^^^^^^

- In buildingspy/development/regressiontest.py, add option to get the coverage
rate, i.e., what percentage of examples are covered by regression tests.
(https://github.com/lbl-srg/BuildingsPy/issues/253)
- In buildingspy/development/regressiontest.py, add option to create reference
results in batch mode.
(https://github.com/lbl-srg/BuildingsPy/issues/560)
Expand Down
3 changes: 1 addition & 2 deletions buildingspy/development/regressiontest.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ def getModelicaCommand(self):
elif self._modelica_tool != 'dymola':
return 'jm_ipython.sh'
else:
return "C://Program Files//Dymola 2023x//bin64//Dymola"
return self._modelica_tool

def isExecutable(self, program):
Expand Down Expand Up @@ -4355,7 +4354,7 @@ def getCoverage(self):
) and not filepath.endswith(('package.mo', '.order')):
all_examples.append(filepath)

n_tested_examples = len(temp_data)
n_tested_examples = len(self._data)
n_examples = len(all_examples)
if n_examples > 0:
coverage = round(n_tested_examples / n_examples, 2) * 100
Expand Down