Skip to content

Commit 30ec665

Browse files
committed
tests
1 parent a2ea5a7 commit 30ec665

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

deeplake/api/tests/test_json.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,10 @@ def upload(stuff, ds):
245245
assert ds.list.data()["value"] == items
246246
assert ds.list[0].list() == items[0]
247247
assert ds.list.list() == items
248+
249+
250+
def test_empty_json(memory_ds):
251+
with memory_ds as ds:
252+
ds.create_tensor("json", htype="json")
253+
254+
assert ds.json.data()["value"] == []

deeplake/api/tests/test_text.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,10 @@ def test_text_tensor_append(memory_ds):
9595
for i in range(3):
9696
assert ds.x[i].data() == ds2.x[i].data()
9797
assert ds.y[i].data() == ds2.y[i].data()
98+
99+
100+
def test_empty_text(memory_ds):
101+
with memory_ds as ds:
102+
ds.create_tensor("text", htype="text")
103+
104+
assert ds.text.data()["value"] == []

0 commit comments

Comments
 (0)