MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / reported_names

Function reported_names

tests/test_detect_breaking_changes.py:61–80  ·  view source on GitHub ↗
(repo: Path, *, baseline: dict[str, str], tip: dict[str, str])

Source from the content-addressed store, hash-verified

59
60
61def reported_names(repo: Path, *, baseline: dict[str, str], tip: dict[str, str]) -> list[str]:
62 (repo / "scripts").mkdir()
63 shutil.copy(SCRIPT, repo / "scripts")
64 write_package(repo, baseline)
65 git(repo, "init")
66 git(repo, "add", ".")
67 git(repo, "commit", "-m", "baseline")
68 write_package(repo, tip)
69
70 result = subprocess.run(
71 [sys.executable, "scripts/detect-breaking-changes.py", "HEAD"],
72 cwd=repo,
73 env=subprocess_env(),
74 capture_output=True,
75 text=True,
76 )
77
78 lines = [line for line in result.stdout.splitlines() if line.startswith("(")]
79 assert result.returncode == (1 if lines else 0), result.stdout + result.stderr
80 return sorted(line.split()[-1].removeprefix(f"{PACKAGE}.") for line in lines)
81
82
83@pytest.mark.parametrize(

Callers 1

test_reported_namesFunction · 0.85

Calls 5

write_packageFunction · 0.85
gitFunction · 0.85
subprocess_envFunction · 0.85
copyMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected