コード例 #1
0
ファイル: test_common.py プロジェクト: groutr/conda
    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()
コード例 #2
0
ファイル: test_common.py プロジェクト: marcelotrevisani/conda
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()
コード例 #3
0
    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()
コード例 #4
0
ファイル: test_common.py プロジェクト: strongeryan/conda
    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()
コード例 #5
0
ファイル: test_common.py プロジェクト: mingwandroid/conda
    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()
コード例 #6
0
    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)
コード例 #7
0
ファイル: pscheck.py プロジェクト: pombredanne/MITH_Session
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
コード例 #8
0
ファイル: pscheck.py プロジェクト: rhs2132/conda
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
コード例 #9
0
ファイル: pscheck.py プロジェクト: kevinaloys/conda
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