# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
import re from datetime import datetime from pathlib import Path
import mozunit
from mozversioncontrol import get_repository_object
# Setup step for jj to allow untracked changes.
repo.execute_next_step()
# Modify both foo and bar
repo.execute_next_step() if repo.vcs != "jj": # jj never has a dirty working directory. assertnot vcs.working_directory_clean()
date_string = "2017-07-14 02:40:00 +0000"
# Commit just bar
vcs.commit(
message="Modify bar\n\nbut not baz",
author="Testing McTesterson <test@example.org>",
date=date_string,
paths=["bar"],
)
# We only committed bar, so foo is still keeping the working dir dirty. jj # always treats the working directory as clean, because the top commit holds # any changes in it. if repo.vcs == "jj": assert vcs.working_directory_clean() else: assertnot vcs.working_directory_clean()
matches = [
line for line in patch.splitlines() if any(re.fullmatch(p, line) for p in patterns)
]
assert matches, f"No diff marker found for '{filename}'" assert len(matches) == 1, (
f"More than one diff marker for '{filename}': {matches}"
)
return matches[0]
marker = find_diff_marker(patch, "bar")
# Check that we found the appropriate diff marker assert any(
marker.startswith(prefix) for prefix in [ "diff --git a/bar b/bar", "Modified regular file bar:", "diff -r ",
]
)
if __name__ == "__main__":
mozunit.main()
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.