File: test_bash.py

package info (click to toggle)
python-virtualenv 20.17.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,580 kB
  • sloc: python: 9,952; sh: 149; ansic: 61; csh: 35; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pytest

from virtualenv.activation import BashActivator
from virtualenv.info import IS_WIN


@pytest.mark.skipif(IS_WIN, reason="Github Actions ships with WSL bash")
def test_bash(raise_on_non_source_class, activation_tester):
    class Bash(raise_on_non_source_class):
        def __init__(self, session):
            super().__init__(
                BashActivator,
                session,
                "bash",
                "activate",
                "sh",
                "You must source this script: $ source ",
            )

        def print_prompt(self):
            return self.print_os_env_var("PS1")

    activation_tester(Bash)