MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / test_save_empty_list

Method test_save_empty_list

tests/datasets/test_formatters.py:158–165  ·  view source on GitHub ↗

Test saving empty list.

(self, json_format, temp_dir)

Source from the content-addressed store, hash-verified

156 assert "unicode test value" in content
157
158 def test_save_empty_list(self, json_format, temp_dir):
159 """Test saving empty list."""
160 filepath = os.path.join(temp_dir, "empty.json")
161 json_format.save([], filepath)
162
163 with open(filepath, "r") as f:
164 loaded = json.load(f)
165 assert loaded == []
166
167 def test_save_creates_parent_directory(
168 self, json_format, temp_dir, sample_data_list

Callers

nothing calls this directly

Calls 2

saveMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected