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

Method test_from_dict_full

tests/datasets/test_config.py:57–69  ·  view source on GitHub ↗

Test creating from dict with all fields.

(self)

Source from the content-addressed store, hash-verified

55 assert config.source == "Test"
56
57 def test_from_dict_full(self):
58 """Test creating from dict with all fields."""
59 data = {
60 "file_path": "/data/test.json",
61 "source": "TestSource",
62 "data_size": 500,
63 "custom_field": "data", # Extra fields go into 'extra' dict
64 }
65 config = DatasetConfig.from_dict(data)
66 assert config.file_path == "/data/test.json"
67 assert config.source == "TestSource"
68 assert config.data_size == 500
69 assert config.extra == {"custom_field": "data"}
70
71 def test_to_dict(self):
72 """Test converting to dict."""

Callers

nothing calls this directly

Calls 1

from_dictMethod · 0.45

Tested by

no test coverage detected