Skip to content

Commit 4060b81

Browse files
author
Carl Meyer
committed
fix test names, remove old doctest files
1 parent 717a0c2 commit 4060b81

18 files changed

+272
-843
lines changed

tests/test_basic.py

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
from os.path import abspath, join, dirname, pardir
33
from test_pip import here, reset_env, run_pip, pyversion, lib_py
44

5-
def test_0():
6-
'''
7-
Check we are running proper version of pip in run_pip::
8-
'''
5+
def test_correct_pip_version():
6+
"""
7+
Check we are running proper version of pip in run_pip.
8+
9+
"""
910
reset_env()
1011
base = abspath(join(dirname(__file__), pardir))
1112
result = run_pip('--version')
1213
assert base in result.stdout, result.stdout
1314

14-
def test_1():
15-
'''
16-
First a test of the distutils-configuration-setting command (which is distinct from other commands)::
17-
'''
15+
def test_distutils_configuration_setting():
16+
"""
17+
Test the distutils-configuration-setting command (which is distinct from other commands).
18+
19+
"""
1820
#print run_pip('-vv', '--distutils-cfg=easy_install:index_url:http://download.zope.org/ppix/', expect_error=True)
1921
#Script result: python ../../poacheggs.py -E .../poacheggs-tests/test-scratch -vv --distutils-cfg=easy_install:index_url:http://download.zope.org/ppix/
2022
#-- stdout: --------------------
@@ -25,29 +27,32 @@ def test_1():
2527
#-- updated: -------------------
2628
# lib/python2.4/distutils/distutils.cfg (346 bytes)
2729

28-
def test_2():
29-
'''
30-
Next, a simple test::
31-
'''
30+
def test_install_from_pypi():
31+
"""
32+
Test installing a package from PyPI.
33+
34+
"""
3235
reset_env()
3336
result = run_pip('install', '-vvv', 'INITools==0.2', expect_error=True)
34-
assert (lib_py + 'site-packages/INITools-0.2-py%s.egg-info' % pyversion) in result.files_created, str(result) #sorted(result.files_created.keys())
37+
assert (lib_py + 'site-packages/INITools-0.2-py%s.egg-info' % pyversion) in result.files_created, str(result)
3538
assert (lib_py + 'site-packages/initools') in result.files_created, sorted(result.files_created.keys())
3639

37-
def test_3():
38-
'''
39-
Let's try that again, editable::
40-
'''
40+
def test_editable_install():
41+
"""
42+
Test editable installation.
43+
44+
"""
4145
reset_env()
4246
result = run_pip('install', '-e', 'INITools==0.2', expect_error=True)
4347
assert "--editable=INITools==0.2 should be formatted with svn+URL" in result.stdout
4448
assert len(result.files_created) == 1, result.files_created
4549
assert not result.files_updated, result.files_updated
4650

47-
def test_4():
48-
'''
49-
Now, checking out from svn::
50-
'''
51+
def test_install_editable_from_svn():
52+
"""
53+
Test checking out from svn.
54+
55+
"""
5156
reset_env()
5257
result = run_pip('install', '-e', 'svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev', expect_error=True)
5358
egg_link = result.files_created[lib_py + 'site-packages/INITools.egg-link']
@@ -58,18 +63,20 @@ def test_4():
5863
assert 'src/initools/.svn' in result.files_created
5964

6065

61-
def test_5():
62-
'''
63-
Using package==dev::
64-
'''
66+
def test_install_dev_version_from_pypi():
67+
"""
68+
Test using package==dev.
69+
70+
"""
6571
reset_env()
6672
result = run_pip('install', 'INITools==dev', expect_error=True)
6773
assert (lib_py + 'site-packages/initools') in result.files_created, str(result.stdout)
6874

69-
def test_6():
70-
'''
71-
Cloning from Git::
72-
'''
75+
def test_install_editable_from_git():
76+
"""
77+
Test cloning from Git.
78+
79+
"""
7380
reset_env()
7481
result = run_pip('install', '-e', 'git://github.com/jezdez/django-feedutil.git#egg=django-feedutil', expect_error=True)
7582
egg_link = result.files_created[lib_py + 'site-packages/django-feedutil.egg-link']
@@ -79,10 +86,11 @@ def test_6():
7986
assert 'src/django-feedutil' in result.files_created
8087
assert 'src/django-feedutil/.git' in result.files_created
8188

82-
def test_7():
83-
'''
84-
Cloning from Mercurial::
85-
'''
89+
def test_install_editable_from_hg():
90+
"""
91+
Test cloning from Mercurial.
92+
93+
"""
8694
reset_env()
8795
result = run_pip('install', '-e', 'hg+http://bitbucket.org/ubernostrum/django-registration/#egg=django-registration', expect_error=True)
8896
egg_link = result.files_created[lib_py + 'site-packages/django-registration.egg-link']
@@ -92,18 +100,20 @@ def test_7():
92100
assert 'src/django-registration' in result.files_created
93101
assert 'src/django-registration/.hg' in result.files_created
94102

95-
def test_8():
96-
'''
97-
Presence or absence of final slash is also normalized::
98-
'''
103+
def test_vcs_url_final_slash_normalization():
104+
"""
105+
Test that presence or absence of final slash in VCS URL is normalized.
106+
107+
"""
99108
reset_env()
100109
result = run_pip('install', '-e', 'hg+http://bitbucket.org/ubernostrum/django-registration#egg=django-registration', expect_error=True)
101110
assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes
102111

103-
def test_9():
104-
'''
105-
Checking out from Bazaar::
106-
'''
112+
def test_install_editable_from_bazaar():
113+
"""
114+
Test checking out from Bazaar.
115+
116+
"""
107117
reset_env()
108118
result = run_pip('install', '-e', 'bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1/@174#egg=django-wikiapp', expect_error=True)
109119
egg_link = result.files_created[lib_py + 'site-packages/django-wikiapp.egg-link']
@@ -113,10 +123,11 @@ def test_9():
113123
assert 'src/django-wikiapp' in result.files_created
114124
assert 'src/django-wikiapp/.bzr' in result.files_created
115125

116-
def test_10():
117-
'''
118-
Urlquoted characters are normalized for repo URL comparison::
119-
'''
126+
def test_vcs_url_urlquote_normalization():
127+
"""
128+
Test that urlquoted characters are normalized for repo URL comparison.
129+
130+
"""
120131
reset_env()
121132
result = run_pip('install', '-e', 'bzr+http://bazaar.launchpad.net/~django-wikiapp/django-wikiapp/release-0.1#egg=django-wikiapp', expect_error=True)
122133
assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes

tests/test_basic.txt

Lines changed: 0 additions & 97 deletions
This file was deleted.

tests/test_bundle.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
from test_pip import here, reset_env, run_pip, pyversion, lib_py
66
from test_pip import write_file
77

8-
def test_1():
9-
'''
10-
Test making a bundle. We'll grab one package from the filesystem (the
11-
FSPkg dummy package), one from vcs (initools) and one from an index
12-
(pip itself)::
13-
'''
8+
def test_create_bundle():
9+
"""
10+
Test making a bundle. We'll grab one package from the filesystem
11+
(the FSPkg dummy package), one from vcs (initools) and one from an
12+
index (pip itself).
13+
14+
"""
1415
reset_env()
1516
fspkg = 'file://%s/FSPkg' %join(here, 'packages')
1617
dummy = run_pip('install', '-e', fspkg)
@@ -26,4 +27,3 @@ def test_1():
2627
assert 'src/FSPkg/' in files
2728
assert 'src/initools/' in files
2829
assert 'build/pip/' in files
29-

tests/test_bundle.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)