示例#1
0
    def test_activate_virtualenv(self, shell, extension):
        orig_shell = os.environ['SHELL']
        os.environ['SHELL'] = shell

        # Get standard activation command for bash
        command = activate_virtualenv()

        # Return environment to initial shell config.
        os.environ['SHELL'] = orig_shell

        venv = Project().virtualenv_location
        assert command == 'source {0}/bin/activate{1}'.format(venv, extension)
示例#2
0
    def test_activate_virtualenv(self, shell, extension):
        orig_shell = os.environ['SHELL']
        os.environ['SHELL'] = shell

        # Get standard activation command for bash
        command = activate_virtualenv()

        # Return environment to initial shell config.
        os.environ['SHELL'] = orig_shell

        venv = Project().virtualenv_location
        assert command == 'source {0}/bin/activate{1}'.format(venv, extension)
示例#3
0
    def test_activate_virtualenv_no_source(self):
        command = activate_virtualenv(source=False)
        venv = Project().virtualenv_location

        assert command == '{0}/bin/activate'.format(venv)
示例#4
0
    def test_activate_virtualenv_no_source(self):
        command = activate_virtualenv(source=False)
        venv = Project().virtualenv_location

        assert command == '{0}/bin/activate'.format(venv)