Skip to content

Commit 89e2f00

Browse files
committed
test: fix test coverage
1 parent 805ceee commit 89e2f00

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Changed
9-
- Misc: Some code refactoring, enhance assemble_attributes
9+
- Misc: Some code refactoring, enhance assemble_attributes.
10+
### Fixed
11+
- Test: Test for `tree_to_nested_dict_key` for BinaryNode.
12+
- Error: Check and throw error for `dataframe_to_dag`, previously this error will not have been found out.
1013

1114
## [0.30.0] - 2025-09-05
1215
### Added:

tests/binarytree/test_export.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@ def test_tree_to_nested_dict(binarytree_node):
9292
assert actual == expected, f"Expected\n{expected}\nReceived\n{actual}"
9393

9494

95+
class TestTreeToNestedDictKey:
96+
@staticmethod
97+
def test_tree_to_nested_dict_key(binarytree_node):
98+
expected = {
99+
"1": {
100+
"children": {
101+
"2": {
102+
"children": {
103+
"4": {"children": {"8": {}}},
104+
"5": {},
105+
},
106+
},
107+
"3": {"children": {"6": {}, "7": {}}},
108+
},
109+
}
110+
}
111+
actual = export.tree_to_nested_dict_key(binarytree_node)
112+
assert actual == expected, f"Expected\n{expected}\nReceived\n{actual}"
113+
114+
95115
class TestTreeToDot:
96116
@staticmethod
97117
def test_tree_to_dot(binarytree_node):

0 commit comments

Comments
 (0)