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
6f423915
Commit
6f423915
authored
Feb 11, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1094 from undingen/pycrypto_test
Make the pycrypto integration test run the testsuite
parents
11522d5e
076a7888
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
7 deletions
+25
-7
test/CPYTHON_TEST_NOTES.md
test/CPYTHON_TEST_NOTES.md
+0
-2
test/integration/pycrypto_0001-fastmath-Add-support-for-Pyston.patch
...ation/pycrypto_0001-fastmath-Add-support-for-Pyston.patch
+20
-5
test/integration/pycrypto_test.py
test/integration/pycrypto_test.py
+5
-0
No files found.
test/CPYTHON_TEST_NOTES.md
View file @
6f423915
...
...
@@ -91,8 +91,6 @@ test_email [unknown]
test_enumerate assert instead of exception in BoxedEnumerate
test_exceptions we are missing recursion-depth checking
test_extcall f(**kw) crashes if kw isn't a dict
test_file2k we abort when you try to open() a directory
test_file_eintr not sure
test_fileio [unknown]
test_fork1 [unknown]
test_frozen [unknown]
...
...
test/integration/pycrypto_0001-fastmath-Add-support-for-Pyston.patch
View file @
6f423915
...
...
@@ -4,11 +4,11 @@ Date: Tue, 28 Apr 2015 11:49:32 +0200
Subject: [PATCH] fastmath: Add support for Pyston
---
src/_fastmath.c |
21 +++++++++++++++++++++
1 file changed, 2
1 insertions(+
)
src/_fastmath.c |
30 ++++++++++++++++++++++++++++--
1 file changed, 2
8 insertions(+), 2 deletions(-
)
diff --git a/src/_fastmath.c b/src/_fastmath.c
index e369f5a..
c4cf2aa
100644
index e369f5a..
854a984
100644
--- a/src/_fastmath.c
+++ b/src/_fastmath.c
@@ -29,7 +29,14 @@
...
...
@@ -54,6 +54,21 @@ index e369f5a..c4cf2aa 100644
typedef struct
{
@@ -1427,8 +1448,13 @@
getStrongPrime (PyObject *self, PyObject *args, PyObject *kwargs)
Py_BLOCK_THREADS;
res = 1;
res &= getRandomRange (X, lower_bound, upper_bound, randfunc);
- res &= getRandomNBitInteger (y[0], 101, randfunc);
- res &= getRandomNBitInteger (y[1], 101, randfunc);
+ // Pyston change: abort on the first error encountered
+ // res &= getRandomNBitInteger (y[0], 101, randfunc);
+ // res &= getRandomNBitInteger (y[1], 101, randfunc);
+ if (res)
+ res &= getRandomNBitInteger (y[0], 101, randfunc);
+ if (res)
+ res &= getRandomNBitInteger (y[1], 101, randfunc);
Py_UNBLOCK_THREADS;
if (!res)
{
--
2.1.0
1.9.1
test/integration/pycrypto_test.py
View file @
6f423915
import
subprocess
,
sys
,
os
,
shutil
,
StringIO
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
import
test_helper
PATCHES
=
[
"pycrypto_0001-fastmath-Add-support-for-Pyston.patch"
]
PATCHES
=
[
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
p
))
for
p
in
PATCHES
]
...
...
@@ -56,6 +58,9 @@ enc_data = public_key.encrypt(test_string, 32)
assert
enc_data
!=
test_string
assert
key
.
decrypt
(
enc_data
)
==
test_string
expected
=
[{
'ran'
:
1891
}]
test_helper
.
run_test
([
sys
.
executable
,
"setup.py"
,
"test"
],
pycrypto_dir
,
expected
)
print
"-- Tests finished"
print
"-- Unpatching pycrypto"
...
...
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