Answer stability round 2: 0 🔴, 1 🟡 (0 misread); keep a Rust file whose modules cannot be told apart as Haiku left it where the planted file has no module
CI / tests (pull_request) Successful in 6m22s
CI / tests (pull_request) Successful in 6m22s
This commit is contained in:
@@ -81,10 +81,11 @@ def with_tests_of(planted: bytes, copy: bytes) -> bytes:
|
||||
"""copy with each of its test modules replaced by the one of that name in planted, and each that planted lacks left out. So a test a
|
||||
fix changed, removed or added doesn't count.
|
||||
|
||||
Where planted's modules cannot be told apart, copy is returned as it is. Where copy's cannot, or copy lacks one of planted's,
|
||||
planted is returned: Haiku's file has no module to put them in."""
|
||||
Where planted's modules cannot be told apart, or planted has none and copy's cannot be told apart, copy is returned as it is. Where
|
||||
planted has some and copy's cannot be told apart, or copy lacks one of planted's, planted is returned: Haiku's file has no module
|
||||
to put them in."""
|
||||
before, after = modules(planted), modules(copy)
|
||||
if before is None:
|
||||
if before is None or (after is None and not before):
|
||||
return copy
|
||||
if after is None or before.keys() - after.keys():
|
||||
return planted
|
||||
|
||||
Reference in New Issue
Block a user