def test_dry_run_exit(self): with env_var('CONDA_DRY_RUN', 'true', reset_context): from conda.cli.common import confirm_yn with pytest.raises(DryRunExit): confirm_yn() from conda.cli.common import confirm with pytest.raises(DryRunExit): confirm()
def test_dry_run_exit(): with env_var('CONDA_DRY_RUN', 'true', stack_callback=conda_tests_ctxt_mgmt_def_pol): with pytest.raises(DryRunExit): confirm_yn() with pytest.raises(DryRunExit): confirm()
def test_dry_run_exit(self): with env_var('CONDA_DRY_RUN', 'true', conda_tests_ctxt_mgmt_def_pol): from conda.cli.common import confirm_yn with pytest.raises(DryRunExit): confirm_yn() from conda.cli.common import confirm with pytest.raises(DryRunExit): confirm()
def test_dry_run_exit(self): args = AttrDict({ 'dry_run': True, }) from conda.cli.common import confirm_yn with pytest.raises(DryRunExit): confirm_yn(args) from conda.cli.common import confirm with pytest.raises(DryRunExit): confirm(args)
def main(args, windowsonly=True): # Returns True for force, otherwise None if sys.platform == "win32" or not windowsonly: if args.yes: check_processes() else: while not check_processes(): choice = confirm(args, message="Continue (yes/no/force)", choices=("yes", "no", "force"), default="no") if choice == "no": sys.exit(1) if choice == "force": return True
def main(args, windowsonly=True): # Returns True for force, otherwise None if sys.platform == 'win32' or not windowsonly: if args.yes: check_processes() else: while not check_processes(): choice = confirm(args, message="Continue (yes/no/force)", choices=('yes', 'no', 'force'), default='no') if choice == 'no': sys.exit(1) if choice == 'force': return True