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

Function temp_json_file

tests/conftest.py:98–103  ·  view source on GitHub ↗

Create a temporary JSON file with sample data.

(temp_dir, sample_data_list)

Source from the content-addressed store, hash-verified

96
97@pytest.fixture
98def temp_json_file(temp_dir, sample_data_list):
99 """Create a temporary JSON file with sample data."""
100 filepath = os.path.join(temp_dir, "test_data.json")
101 with open(filepath, "w", encoding="utf-8") as f:
102 json.dump(sample_data_list, f, ensure_ascii=False, indent=2)
103 return filepath
104
105
106@pytest.fixture

Callers

nothing calls this directly

Calls 1

dumpMethod · 0.80

Tested by

no test coverage detected