MCPcopy Index your code
hub / github.com/vinta/awesome-python / test_loads_valid_json

Method test_loads_valid_json

website/tests/test_build.py:949–954  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

947 assert result == {}
948
949 def test_loads_valid_json(self, tmp_path):
950 data = {"psf/requests": {"stars": 52467, "owner": "psf", "fetched_at": "2026-01-01T00:00:00+00:00"}}
951 f = tmp_path / "stars.json"
952 f.write_text(json.dumps(data), encoding="utf-8")
953 result = load_stars(f)
954 assert result["psf/requests"]["stars"] == 52467
955
956 def test_returns_empty_on_corrupt_json(self, tmp_path):
957 f = tmp_path / "stars.json"

Callers

nothing calls this directly

Calls 1

load_starsFunction · 0.90

Tested by

no test coverage detected