Skip to content

Commit eaa30aa

Browse files
Merge pull request #40 from codeflash-ai/cf551
[CF-551] Fix extra test type in TestType
2 parents ad5beaa + 6390d6b commit eaa30aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

codeflash/verification/test_results.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TestType(Enum):
3333
INIT_STATE_TEST = 6
3434

3535
def to_name(self) -> str:
36-
if self == TestType.INIT_STATE_TEST:
36+
if self is TestType.INIT_STATE_TEST:
3737
return ""
3838
names = {
3939
TestType.EXISTING_UNIT_TEST: "⚙️ Existing Unit Tests",
@@ -166,6 +166,8 @@ def report_to_string(report: dict[TestType, dict[str, int]]) -> str:
166166
def report_to_tree(report: dict[TestType, dict[str, int]], title: str) -> Tree:
167167
tree = Tree(title)
168168
for test_type in TestType:
169+
if test_type is TestType.INIT_STATE_TEST:
170+
continue
169171
tree.add(
170172
f"{test_type.to_name()} - Passed: {report[test_type]['passed']}, Failed: {report[test_type]['failed']}"
171173
)

0 commit comments

Comments
 (0)