File: test_common.py

package info (click to toggle)
python-pipx 1.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,768 kB
  • sloc: python: 9,813; makefile: 17; sh: 7
file content (16 lines) | stat: -rw-r--r-- 532 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from helpers import skip_if_windows
from pipx.commands.common import get_exposed_paths_for_package


@skip_if_windows
def test_get_exposed_paths_ignores_recursive_symlink(tmp_path):
    venv_resource_path = tmp_path / "venv_bin"
    venv_resource_path.mkdir()
    local_resource_dir = tmp_path / "bin"
    local_resource_dir.mkdir()
    loop = local_resource_dir / "recursiveexample"
    loop.symlink_to(loop.name)

    exposed = get_exposed_paths_for_package(venv_resource_path, local_resource_dir)

    assert loop not in exposed