> I thought I'd add a test for this as patch pilot, so I put in this one based
> on bug 502076:
>
> def test_parse_leading_noise(self):
> """Parse a valid patch header"""
> # https://bugs.edge.launchpad.net/bzr/+bug/502076
> lines = ["diff -pruN commands.py",
> "--- orig/commands.py"
> "+++ mod/dommands.py"]
> bits = parse_patch(iter(lines), allow_dirty=True)
>
> however this fails with
> Can someone tell me what format this is supposed to be parsing, or what's
> wrong with that test?
Thanks for the test -- there's two problems with this patch:
1) Call parse_patches() instead of parse_patch():
bits = parse_patch(iter(lines), allow_dirty=True)
2) You need a comma in your header lines list:
"--- orig/commands.py",
> I thought I'd add a test for this as patch pilot, so I put in this one based leading_ noise(self) : /bugs.edge. launchpad. net/bzr/ +bug/502076 iter(lines) , allow_dirty=True)
> on bug 502076:
>
> def test_parse_
> """Parse a valid patch header"""
> # https:/
> lines = ["diff -pruN commands.py",
> "--- orig/commands.py"
> "+++ mod/dommands.py"]
> bits = parse_patch(
>
> however this fails with
> Can someone tell me what format this is supposed to be parsing, or what's
> wrong with that test?
Thanks for the test -- there's two problems with this patch: iter(lines) , allow_dirty=True)
1) Call parse_patches() instead of parse_patch():
bits = parse_patch(
2) You need a comma in your header lines list:
"--- orig/commands.py",