-
Notifications
You must be signed in to change notification settings - Fork 5
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
Core tests #119
Core tests #119
Conversation
kilianp14
commented
Aug 10, 2023
- Added tests for all core modules to achieve 100% branch coverage in vessim.core
- Some minor bug fixes
def test_measure(self, power_meter): | ||
assert power_meter.measure() == 20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does the power meter know which power mode to chose initially? the first in the dict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial power mode is "high performance" as specified in the docstring of the MockPowerMeter class
try: | ||
computing_system.finalize() | ||
except Exception as err: | ||
pytest.fail(f"Unexpected Error: {err}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is being tested here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just a test to check if the finalize function throws an error. I just wrote this test to achieve full code coverage, but I agree that it is not very useful.