package: reject duplicate manifest versions
This commit is contained in:
@@ -132,6 +132,14 @@ def main():
|
||||
if "MISSING package manifest: math-tools" not in out:
|
||||
fail(f"Package manifest-version diagnostic was unclear:\n{out}")
|
||||
manifest_path.write_text(manifest, encoding="utf-8")
|
||||
duplicate_version_manifest = manifest + "version: 1\n"
|
||||
manifest_path.write_text(duplicate_version_manifest, encoding="utf-8")
|
||||
rc, out = run([str(EXE), "package", "doctor"], work)
|
||||
if rc == 0:
|
||||
fail("package doctor must reject duplicate package manifest versions")
|
||||
if "BAD package version: math-tools" not in out:
|
||||
fail(f"Package duplicate manifest-version diagnostic was unclear:\n{out}")
|
||||
manifest_path.write_text(manifest, encoding="utf-8")
|
||||
manifest_path.write_text(manifest.replace("version: 1", "version: 10"), encoding="utf-8")
|
||||
rc, out = run([str(EXE), "package", "doctor"], work)
|
||||
if rc == 0:
|
||||
|
||||
Reference in New Issue
Block a user