blob: eb8db7a66bef583e753bc70fe717f6954beeca27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import os
from pytest import yield_fixture
from pytest_fixture_config import yield_requires_config
import pytest_virtualenv
@yield_requires_config(pytest_virtualenv.CONFIG, ['virtualenv_executable'])
@yield_fixture(scope='function')
def bare_virtualenv():
""" Bare virtualenv (no pip/setuptools/wheel).
"""
with pytest_virtualenv.VirtualEnv(args=(
'--no-wheel',
'--no-pip',
'--no-setuptools',
)) as venv:
yield venv
SOURCE_DIR = os.path.join(os.path.dirname(__file__), '../..')
def test_clean_env_install(bare_virtualenv):
"""
Check setuptools can be installed in a clean environment.
"""
bare_virtualenv.run(' && '.join((
'cd {source}',
'python setup.py install',
)).format(source=SOURCE_DIR))
|