Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
6a739454
Commit
6a739454
authored
Aug 14, 2019
by
Benoit Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: drop (easy_install based) manual tests
parent
b9a9aae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
100 deletions
+0
-100
tests/manual_test.py
tests/manual_test.py
+0
-100
No files found.
tests/manual_test.py
deleted
100644 → 0
View file @
b9a9aae8
#!/usr/bin/env python
import
sys
import
os
import
shutil
import
tempfile
import
subprocess
from
distutils.command.install
import
INSTALL_SCHEMES
from
string
import
Template
from
setuptools.extern.six.moves
import
urllib
def
_system_call
(
*
args
):
assert
subprocess
.
call
(
args
)
==
0
def
tempdir
(
func
):
def
_tempdir
(
*
args
,
**
kwargs
):
test_dir
=
tempfile
.
mkdtemp
()
old_dir
=
os
.
getcwd
()
os
.
chdir
(
test_dir
)
try
:
return
func
(
*
args
,
**
kwargs
)
finally
:
os
.
chdir
(
old_dir
)
shutil
.
rmtree
(
test_dir
)
return
_tempdir
SIMPLE_BUILDOUT
=
"""
\
[buildout]
parts = eggs
[eggs]
recipe = zc.recipe.egg
eggs =
extensions
"""
BOOTSTRAP
=
'http://downloads.buildout.org/1/bootstrap.py'
PYVER
=
sys
.
version
.
split
()[
0
][:
3
]
_VARS
=
{
'base'
:
'.'
,
'py_version_short'
:
PYVER
}
scheme
=
'nt'
if
sys
.
platform
==
'win32'
else
'unix_prefix'
PURELIB
=
INSTALL_SCHEMES
[
scheme
][
'purelib'
]
@
tempdir
def
test_virtualenv
():
"""virtualenv with setuptools"""
purelib
=
os
.
path
.
abspath
(
Template
(
PURELIB
).
substitute
(
**
_VARS
))
_system_call
(
'virtualenv'
,
'--no-site-packages'
,
'.'
)
_system_call
(
'bin/easy_install'
,
'setuptools==dev'
)
# linux specific
site_pkg
=
os
.
listdir
(
purelib
)
site_pkg
.
sort
()
assert
'setuptools'
in
site_pkg
[
0
]
easy_install
=
os
.
path
.
join
(
purelib
,
'easy-install.pth'
)
with
open
(
easy_install
)
as
f
:
res
=
f
.
read
()
assert
'setuptools'
in
res
@
tempdir
def
test_full
():
"""virtualenv + pip + buildout"""
_system_call
(
'virtualenv'
,
'--no-site-packages'
,
'.'
)
_system_call
(
'bin/easy_install'
,
'-q'
,
'setuptools==dev'
)
_system_call
(
'bin/easy_install'
,
'-qU'
,
'setuptools==dev'
)
_system_call
(
'bin/easy_install'
,
'-q'
,
'pip'
)
_system_call
(
'bin/pip'
,
'install'
,
'-q'
,
'zc.buildout'
)
with
open
(
'buildout.cfg'
,
'w'
)
as
f
:
f
.
write
(
SIMPLE_BUILDOUT
)
with
open
(
'bootstrap.py'
,
'w'
)
as
f
:
f
.
write
(
urllib
.
request
.
urlopen
(
BOOTSTRAP
).
read
())
_system_call
(
'bin/python'
,
'bootstrap.py'
)
_system_call
(
'bin/buildout'
,
'-q'
)
eggs
=
os
.
listdir
(
'eggs'
)
eggs
.
sort
()
assert
len
(
eggs
)
==
3
assert
eggs
[
1
].
startswith
(
'setuptools'
)
del
eggs
[
1
]
assert
eggs
==
[
'extensions-0.3-py2.6.egg'
,
'zc.recipe.egg-1.2.2-py2.6.egg'
,
]
if
__name__
==
'__main__'
:
test_virtualenv
()
test_full
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment