-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Location
package/src/pyaslreport/utils/unit_conversion_utils.py:33
Description
convert_milliseconds_to_seconds is missing the @staticmethod decorator, while its sibling convert_to_milliseconds has it. When called from a class instance (e.g., BaseSequence._extract_common_metadata), Python passes the instance as the first positional argument (values), silently corrupting the conversion.
Reproduction (on main branch)
Script
from pyaslreport.utils.unit_conversion_utils import UnitConverterUtils
# Test 1: Class-level call
r = UnitConverterUtils.convert_milliseconds_to_seconds(15.0) # works by accident
# Test 2: Instance-level call (how BaseSequence uses it)
r = UnitConverterUtils().convert_milliseconds_to_seconds(15.0) # self consumed as values
# Test 3: Introspection
d = UnitConverterUtils.__dict__
isinstance(d['convert_milliseconds_to_seconds'], staticmethod) # False — BUGResults on main branch
| # | Test | Status | Detail |
|---|---|---|---|
| 1 | Class-level call | PASS | Works by accident (no self when called on class) |
| 2 | Instance-level call | FAIL | self consumed as values param, real arg ignored |
| 3 | @staticmethod present |
FAIL | Decorator missing from convert_milliseconds_to_seconds |
Summary: PASSED=1, FAILED=2
I have worked on this. This is just the issues i made in your private repo. Now, it is part of OSIPI, I will make the report the issues again here and make the PR in this repo.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels