# 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/.
from pathlib import Path from unittest import mock from unittest.mock import Mock, patch
import pytest from mozbuild.base import MachCommandBase from mozunit import main
import mach.decorators import mach.registrar from mach.base import MachError from mach.decorators import Command, CommandArgument, SubCommand from mach.requirements import MachEnvRequirements from mach.site import CommandSiteManager, MozSiteMetadata, SitePackagesSource
# We test that the virtualenv is set up properly dynamically on # the instance that actually runs the command.
@Command("cmd_foo", category="testing", virtualenv_name="env_foo") def run_foo(command_context): assert (
Path(command_context.virtualenv_manager.virtualenv_root).name == "env_foo"
)
inner_function("foo")
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.