now tests check out and use INITools local svn repository and local_repo function has been moved to tests/local_repos.py module

This commit is contained in:
Hugo Lopes Tavares 2010-06-16 06:51:21 -03:00
parent c8047c4bbe
commit 23cb437dde
6 changed files with 20 additions and 17 deletions

View File

@ -1,8 +1,8 @@
import re
import filecmp
from os.path import abspath, join, curdir, pardir
from test_pip import (here, reset_env, run_pip, pyversion, mkdir,
src_folder, local_repo)
from test_pip import here, reset_env, run_pip, pyversion, mkdir, src_folder
from local_repos import local_repo
from path import Path

View File

@ -1,10 +1,10 @@
import zipfile
import textwrap
from os.path import join
from test_pip import (here, reset_env, run_pip, write_file,
local_repo)
from path import Path
from pip.util import path_to_url2
from test_pip import here, reset_env, run_pip, write_file
from path import Path
from local_repos import local_repo
def test_create_bundle():

View File

@ -1,7 +1,7 @@
import textwrap
from os.path import abspath, exists, join
from test_pip import (here, reset_env, run_pip, write_file,
local_repo)
from test_pip import here, reset_env, run_pip, write_file
from local_repos import local_repo
def test_cleanup_after_install_from_pypi():

View File

@ -2,8 +2,9 @@ import sys
import re
import textwrap
from doctest import OutputChecker, ELLIPSIS
from test_pip import (reset_env, run_pip, write_file, get_env,
local_repo)
from test_pip import reset_env, run_pip, write_file, get_env
from local_repos import local_repo
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)
@ -59,18 +60,20 @@ def test_freeze():
simplejson==1.7.4...
<BLANKLINE>""")
_check_output(result, expected)
# Now lets try it with an svn checkout::
result = env.run('svn', 'co', '-r3472', 'http://svn.colorstudy.com/INITools/trunk', 'initools-trunk')
result = env.run('svn', 'co', '-r3472',
local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
'initools-trunk')
result = env.run('python', 'setup.py', 'develop',
cwd=env.scratch_path/ 'initools-trunk')
result = run_pip('freeze', expect_stderr=True)
expected = textwrap.dedent("""\
Script result: ...pip freeze
-- stdout: --------------------
-e svn+http://svn.colorstudy.com/INITools/trunk@3472#egg=INITools-0.2.1dev_r3472-py2...-dev_r3472
-e svn+%s@3472#egg=INITools-0.2.1dev_r3472-py2...-dev_r3472
simplejson==1.7.4...
<BLANKLINE>""")
<BLANKLINE>""" % local_repo('svn+http://svn.colorstudy.com/INITools/trunk'))
_check_output(result, expected)
# Now, straight from trunk (but not editable/setup.py develop)::
@ -104,7 +107,7 @@ def test_freeze():
_check_output(result, expected)
def test_freeze_git_clone():
#def test_freeze_git_clone():
"""
Test freezing a Git clone.

View File

@ -7,7 +7,6 @@ import glob
import atexit
import textwrap
import urllib
from pip.vcs import subversion, git, bazaar, mercurial
from scripttest import TestFileEnvironment
from path import Path, curdir

View File

@ -1,5 +1,6 @@
import textwrap
from test_pip import reset_env, run_pip, write_file, pyversion
from local_repos import local_repo
def test_requirements_file():
@ -27,8 +28,8 @@ def test_multiple_requirements_files():
"""
env = reset_env()
write_file('initools-req.txt', textwrap.dedent("""\
-e svn+http://svn.colorstudy.com/INITools/trunk@3139#egg=INITools-dev
-r simplejson-req.txt"""))
-e svn+%s@3139#egg=INITools-dev
-r simplejson-req.txt""" % local_repo('http://svn.colorstudy.com/INITools/trunk')))
write_file('simplejson-req.txt', textwrap.dedent("""\
simplejson<=1.7.4
"""))