#!/usr/bin/env python import os import platform import subprocess from pathlib import Path from unittest import mock
import mozunit import pytest
from mozperftest.system.macos import MacosDevice from mozperftest.tests.support import DMG, get_running_env
def run_proc(*args, **kw): if args[0][1] == "attach":
where = args[0][4]
bindir = Path(where, "firefox.app", "Contents", "MacOS")
os.makedirs(str(bindir))
firefox_bin = bindir / "firefox" with firefox_bin.open("w") as f:
f.write("OK")
def mock_calls(test): # on macOS we don't mock the system calls # so we're mounting for real using hdiutil if platform.system() == "Darwin": return test
# on other platforms, we're unsing run_proc
@mock.patch("mozperftest.system.macos.MacosDevice._run_process", new=run_proc) def wrapped(*args, **kw): return test(*args, **kw)
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.