# 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 os import subprocess import textwrap import uuid
import mozunit import pytest
from mozversioncontrol import MissingVCSExtension, get_repository_object
def test_push_to_try_missing_extensions(repo, monkeypatch): if repo.vcs != "git": return
vcs = get_repository_object(repo.dir)
orig = vcs._run
def cinnabar_raises(*args, **kwargs): # Simulate not having git cinnabar if args[0] == "cinnabar": raise subprocess.CalledProcessError(1, args) return orig(*args, **kwargs)
monkeypatch.setattr(vcs, "_run", cinnabar_raises)
with pytest.raises(MissingVCSExtension):
vcs.push_to_try("commit message")
if __name__ == "__main__":
mozunit.main()
¤ 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.0.15Bemerkung:
(vorverarbeitet)
¤
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 ist noch experimentell.