mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
test merge fixes
This commit is contained in:
parent
1a182cb819
commit
3e460e6946
2 changed files with 6 additions and 33 deletions
|
@ -4,16 +4,10 @@ import textwrap
|
|||
from os.path import abspath, join, curdir, pardir
|
||||
|
||||
from nose import SkipTest
|
||||
from nose.tools import assert_raises
|
||||
from mock import patch
|
||||
|
||||
from pip.util import rmtree, find_command
|
||||
from pip.exceptions import BadCommand
|
||||
|
||||
from tests.test_pip import (here, reset_env, run_pip, pyversion, mkdir,
|
||||
src_folder, write_file, path_to_url)
|
||||
from tests.local_repos import local_checkout
|
||||
from tests.path import Path
|
||||
from pip.util import rmtree
|
||||
from tests.lib import tests_data, reset_env, run_pip, pyversion, mkdir, pip_install_local, write_file, find_links
|
||||
from tests.lib.local_repos import local_checkout
|
||||
from tests.lib.path import Path
|
||||
|
||||
|
||||
def test_pip_second_command_line_interface_works():
|
||||
|
|
|
@ -23,13 +23,12 @@ class TestRequirementSet(object):
|
|||
logger.consumers = []
|
||||
shutil.rmtree(self.tempdir, ignore_errors=True)
|
||||
|
||||
def basic_reqset(self, skip_reqs={}):
|
||||
def basic_reqset(self):
|
||||
return RequirementSet(
|
||||
build_dir=os.path.join(self.tempdir, 'build'),
|
||||
src_dir=os.path.join(self.tempdir, 'src'),
|
||||
download_dir=None,
|
||||
download_cache=os.path.join(self.tempdir, 'download_cache'),
|
||||
skip_reqs=skip_reqs
|
||||
download_cache=os.path.join(self.tempdir, 'download_cache')
|
||||
)
|
||||
|
||||
def test_no_reuse_existing_build_dir(self):
|
||||
|
@ -49,26 +48,6 @@ class TestRequirementSet(object):
|
|||
finder
|
||||
)
|
||||
|
||||
def test_skip_reqs(self):
|
||||
"""Test the skip_reqs list works"""
|
||||
|
||||
reqset = self.basic_reqset(skip_reqs={'simple':''})
|
||||
req = InstallRequirement.from_line('simple')
|
||||
reqset.add_requirement(req)
|
||||
assert not reqset.has_requirements
|
||||
finder = PackageFinder([find_links], [])
|
||||
reqset.prepare_files(finder)
|
||||
assert not reqset.has_requirements
|
||||
|
||||
def test_add_requirement_returns_true_false(self):
|
||||
"""Test add_requirement returns true of false"""
|
||||
|
||||
req = InstallRequirement.from_line('simple')
|
||||
reqset = self.basic_reqset()
|
||||
assert True == reqset.add_requirement(req)
|
||||
reqset = self.basic_reqset(skip_reqs={'simple':''})
|
||||
assert False == reqset.add_requirement(req)
|
||||
|
||||
|
||||
def test_url_with_query():
|
||||
"""InstallRequirement should strip the fragment, but not the query."""
|
||||
|
|
Loading…
Reference in a new issue