Skip to content
Bitcoin Roots

v29.4-roots.1 · Commit 12: [PATCH 12/13] release: add pre-tag artifact rehearsal

ci/test/test_create_patch_series.py

Before: ci/test/test_create_patch_series.py · After: ci/test/test_create_patch_series.py

File metadata
index 56194dbde5fd4bc41bdc2467bc876b9d107bc477..6f9fe3ecb1d5742cffb477370d4f91a4af7cd3be 100755

Download original patch · Release notes

Diff rows 1–33 of 33. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

ci/test/test_create_patch_series.py CHANGED
@@ -27,15 +27,17 @@ class CreatePatchSeriesTest(unittest.TestCase):
27
27
  self.git(repository, "config", "user.name", "Patch test")
28
28
  self.git(repository, "config", "user.email", "patch@example.invalid")
29
29
  (repository / "source").write_text("core\n", encoding="utf-8")
30
+ (repository / "crlf.svg").write_bytes(b"<svg>\r\ncore\r\n</svg>\r\n")
30
31
  workflow = repository / ".github/workflows/ci.yml"
31
32
  workflow.parent.mkdir(parents=True)
32
33
  workflow.write_text("name: Core CI\n", encoding="utf-8")
33
- self.git(repository, "add", "source", ".github")
34
+ self.git(repository, "add", "source", "crlf.svg", ".github")
34
35
  self.git(repository, "commit", "-m", "core", capture_output=True)
35
36
  core_commit = self.git(repository, "rev-parse", "HEAD", capture_output=True, text=True).stdout.strip()
36
37
  self.git(repository, "tag", "-a", "v29.4", "-m", "Core v29.4")
37
38
  self.git(repository, "switch", "-c", "roots/29.4", capture_output=True)
38
39
  (repository / "source").write_text("roots\n", encoding="utf-8")
40
+ (repository / "crlf.svg").write_bytes(b"<svg>\r\nroots\r\n</svg>\r\n")
39
41
  self.git(repository, "commit", "-am", "roots text", capture_output=True)
40
42
  (repository / "binary.dat").write_bytes(bytes(range(256)))
41
43
  self.git(repository, "add", "binary.dat")
@@ -65,7 +67,7 @@ class CreatePatchSeriesTest(unittest.TestCase):
65
67
  self.git(replay, "checkout", "--detach", core_commit, capture_output=True)
66
68
  self.git(
67
69
  replay, "-c", "user.name=Patch replay", "-c", "user.email=replay@example.invalid",
68
- "am", "-3", output, capture_output=True,
70
+ "am", "-3", "--keep-cr", output, capture_output=True,
69
71
  )
70
72
  self.git(
71
73
  replay, "diff", "--quiet", RELEASE_TAG, "HEAD", "--",
@@ -73,6 +75,7 @@ class CreatePatchSeriesTest(unittest.TestCase):
73
75
  )
74
76
  self.git(replay, "diff", "--quiet", core_commit, "HEAD", "--", ".github")
75
77
  self.assertEqual((replay / ".github/workflows/ci.yml").read_text(encoding="utf-8"), "name: Core CI\n")
78
+ self.assertEqual((replay / "crlf.svg").read_bytes(), b"<svg>\r\nroots\r\n</svg>\r\n")
76
79
 
77
80
  def test_rejects_noncanonical_release(self):
78
81
  repository, _ = self.make_release_repository()