Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
be2d285d
Commit
be2d285d
authored
Feb 26, 2016
by
Marius Wachtler
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable our paste integration test and add one for pylons and routes
parent
b0253978
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
13 deletions
+83
-13
.travis.yml
.travis.yml
+1
-1
test/extra/paste_test.py
test/extra/paste_test.py
+22
-12
test/extra/pylons_test.py
test/extra/pylons_test.py
+44
-0
test/extra/routes_test.py
test/extra/routes_test.py
+16
-0
No files found.
.travis.yml
View file @
be2d285d
...
...
@@ -75,7 +75,7 @@ before_script:
script
:
-
ccache -z
-
ninja -j4 pyston check-deps && PYSTON_RUN_ARGS=G travis_wait
30
ctest --output-on-failure
-
ninja -j4 pyston check-deps && PYSTON_RUN_ARGS=G travis_wait
45
ctest --output-on-failure
-
ccache -s
-
if [ -n "$(git status --porcelain --untracked=no)" ]; then echo "test suite left the source directory dirty"; git status;
false
; fi
...
...
test/extra/paste_test.py
View file @
be2d285d
# expected: fail
# The paste test suite uses pytest, so this test file incentally also tests pytest.
# Pytest relies quite heavily on a number of code introspection features, which
# we currently don't have. This includes:
# 1) The ast module
# 2) traceback.tb_frame, traceback.tb_next
import
os
,
sys
,
subprocess
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
...
...
@@ -13,21 +6,38 @@ from test_helper import create_virtenv, run_test
ENV_NAME
=
"paste_test_env_"
+
os
.
path
.
basename
(
sys
.
executable
)
PYTHON_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"python"
))
PYTEST_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"py.test"
))
PASTE_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"paste"
))
PASTE_TEST_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
PASTE_DIR
,
"tests"
))
packages
=
[
"py
test"
,
"paste
"
,
"nose==1.3.7"
]
packages
=
[
"py
==1.4.31"
,
"pytest==2.8.7
"
,
"nose==1.3.7"
]
create_virtenv
(
ENV_NAME
,
packages
,
force_create
=
True
)
# Need the test files in the source
subprocess
.
check_call
([
"hg"
,
"clone"
,
"https://bitbucket.org/ianb/paste"
],
cwd
=
ENV_NAME
)
url
=
"https://pypi.python.org/packages/source/P/Paste/Paste-1.7.5.tar.gz"
subprocess
.
check_call
([
"wget"
,
url
],
cwd
=
ENV_NAME
)
subprocess
.
check_call
([
"tar"
,
"-zxf"
,
"Paste-1.7.5.tar.gz"
],
cwd
=
ENV_NAME
)
PASTE_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"Paste-1.7.5"
))
PASTE_TEST_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
PASTE_DIR
,
"tests"
))
print
">> "
print
">> Setting up paste..."
print
">> "
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"build"
],
cwd
=
PASTE_DIR
)
print
">> "
print
">> Installing paste..."
print
">> "
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"install"
],
cwd
=
PASTE_DIR
)
print
">> "
print
">> Running paste tests..."
print
">> "
subprocess
.
check_call
([
PYTEST_EXE
],
cwd
=
PASTE_TEST_DIR
)
# current cpython also does not pass all tests. (9 failed, 127 passed)
# the additional test we fail are because:
# - we have str.__iter__
# - no sys.settrace
# - no shiftjis encoding
# - slightly different error messages
expected
=
[{
"failed"
:
22
,
"passed"
:
113
}]
run_test
([
PYTEST_EXE
],
cwd
=
PASTE_TEST_DIR
,
expected
=
expected
)
test/extra/pylons_test.py
0 → 100644
View file @
be2d285d
import
os
,
sys
,
subprocess
,
shutil
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
from
test_helper
import
create_virtenv
,
run_test
ENV_NAME
=
"pylons_test_env_"
+
os
.
path
.
basename
(
sys
.
executable
)
SRC_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"src"
))
PYTHON_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"python"
))
NOSE_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"nosetests"
))
def
install_and_test_pylons
():
shutil
.
rmtree
(
SRC_DIR
,
ignore_errors
=
True
)
os
.
makedirs
(
SRC_DIR
)
url
=
"https://pypi.python.org/packages/source/P/Pylons/Pylons-0.9.6.2.tar.gz"
subprocess
.
check_call
([
"wget"
,
url
],
cwd
=
SRC_DIR
)
subprocess
.
check_call
([
"tar"
,
"-zxf"
,
"Pylons-0.9.6.2.tar.gz"
],
cwd
=
SRC_DIR
)
PYLONS_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"Pylons-0.9.6.2"
))
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"install"
],
cwd
=
PYLONS_DIR
)
# most of the errors are because of our coerceUnicodeToStr which raises a TypeError instead of a UnicodeError
# but as we don't support the unicode string correctly every where I don't want to change this currently.
expected
=
[{
"ran"
:
50
,
"errors"
:
7
}]
run_test
([
NOSE_EXE
],
cwd
=
PYLONS_DIR
,
expected
=
expected
)
pkg
=
[
"Mako==1.0.3"
,
"decorator==4.0.9"
,
"simplejson==3.8.2"
,
"FormEncode==1.3.0"
,
"PasteScript==2.0.2"
,
"PasteDeploy==1.5.2"
,
"Paste==2.0.2"
,
"Beaker==1.8.0"
,
"WebHelpers==1.3"
,
"Routes==2.2"
,
"MarkupSafe==0.23"
,
"six==1.10.0"
,
"funcsigs==0.4"
,
"repoze.lru==0.6"
,
"nose==1.3.7"
]
create_virtenv
(
ENV_NAME
,
pkg
,
force_create
=
True
)
install_and_test_pylons
()
test/extra/routes_test.py
0 → 100644
View file @
be2d285d
import
os
,
sys
,
subprocess
,
shutil
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
from
test_helper
import
create_virtenv
,
run_test
ENV_NAME
=
"routes_test_env_"
+
os
.
path
.
basename
(
sys
.
executable
)
SRC_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"src"
))
PYTHON_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"python"
))
pkg
=
[
"nose==1.3.7"
,
"paste==2.0.2"
,
"six==1.10.0"
]
pkg
+=
[
"-e"
,
"git+https://github.com/bbangert/routes.git@v1.7.3#egg=Routes"
]
create_virtenv
(
ENV_NAME
,
pkg
,
force_create
=
True
)
ROUTES_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"routes"
))
expected
=
[{
"ran"
:
141
}]
run_test
([
PYTHON_EXE
,
"setup.py"
,
"test"
],
cwd
=
ROUTES_DIR
,
expected
=
expected
)
Boxiang Sun
@Daetalus
mentioned in commit
db7c7ba4
·
Sep 08, 2016
mentioned in commit
db7c7ba4
mentioned in commit db7c7ba45ad97f262cb89a9993e640cf56de30c8
Toggle commit list
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