Skip to content

Commit 8cfc0b5

Browse files
committed
Fix bug in dead code
1 parent 4026b8d commit 8cfc0b5

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

terminusdb_client/tests/test_woql_path_operations.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,25 @@
66
class TestWOQLPathOperations:
77
"""Test path-related operations and utilities."""
88

9-
9+
@pytest.skip("This method is deprecated and dead code - it is never called anywhere in the codebase.")
10+
def test_data_value_list_with_various_types(self):
11+
"""Test _data_value_list with various item types.
12+
13+
DEPRECATED: This method is dead code - it is never called anywhere in the
14+
codebase. The similar method _value_list() is used instead throughout the
15+
client. This test and the method will be removed in a future release.
16+
"""
17+
query = WOQLQuery()
18+
items = ["string", 42, True, None]
19+
20+
result = query._data_value_list(items)
21+
22+
assert isinstance(result, list)
23+
assert len(result) == 4
24+
# Each item should be converted to DataValue format
25+
for item in result:
26+
assert isinstance(item, dict)
27+
assert "@type" in item
1028

1129
def test_clean_subject_with_var(self):
1230
"""Test _clean_subject with Var object."""

terminusdb_client/woqlquery/woql_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def _vlist(self, target_list):
352352
def _data_value_list(self, target_list):
353353
dvl = []
354354
for item in target_list:
355-
o = self.clean_data_value(item)
355+
o = self._clean_data_value(item)
356356
dvl.append(o)
357357
return dvl
358358

0 commit comments

Comments
 (0)