File: test_utils.py

package info (click to toggle)
spyder-kernels 3.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,088 kB
  • sloc: python: 6,327; sh: 9; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- 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()])