HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/Lib/site-packages/spyder_kernels/customize/tests/test_utils.py
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2009- Spyder Kernels Contributors
#
# Licensed under the terms of the MIT License
# (see spyder_kernels/__init__.py for details)
# -----------------------------------------------------------------------------

import os
import sys

from spyder_kernels.customize.utils import create_pathlist


def test_user_sitepackages_in_pathlist():
    """Test that we include user site-packages in pathlist."""
    if sys.platform.startswith('linux'):
        user_path = 'local'
    elif (sys.platform == 'darwin' or sys.platform.startswith('freebsd')):
        user_path = os.path.expanduser('~/.local')
    else:
        user_path = 'Roaming'

    assert any([user_path in path for path in create_pathlist()])