pypy support for tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyOpenSSL |
New
|
Undecided
|
Unassigned | ||
pyopenssl (Gentoo Linux) |
Incomplete
|
Unknown
|
Bug Description
This has taken forever to figure this far. pypy does quite well with the test suite, but it falls over at
test_crypto.py && test_ssl.py.
see bug https:/
The first one I had fixed in 10 minutes.
diff -ur pyOpenSSL-
--- OpenSSL/
+++ OpenSSL/
@@ -7,7 +7,7 @@
from unittest import main
-import os, re
+import os, re, sys
from subprocess import PIPE, Popen
from datetime import datetime, timedelta
@@ -677,7 +677,10 @@
class evil(str):
pass
- self.assertRais
+ if hasattr(sys, 'pypy_version_
+ self.assertRais
+ else:
+ self.assertRais
def test_setInvalid
The second one brought me here for you maintainers to polish off. Try as I may I could NOT find the source of the setting of TypeError as the exception error 'type' or whatever. Instead I have made the test pass by following the error msg from the pypy run which was NOT the intended method. However, it gives you food for thought.
try:
memoryview
except NameError:
"cannot test sending memoryview without memoryview"
else:
def test_short_
"""
When passed a memoryview onto a small number of bytes,
bytes sent.
"""
server, client = self._loopback()
count = server.
try:
memoryview
except NameError:
"cannot test sending memoryview without memoryview"
else:
def test_short_
"""
When passed a memoryview onto a small number of bytes,
"""
server, client = self._loopback()
I can't decipher what memoryview is supposed to be. This makes it appear a circular referencing, but maybe it's designed and defined somewhere else all together, too hard for me.
The patch substitutes AttributeError for TypeError and I've spent more than long enough trying to do the same for test_ssl.py and I can only figure that's not the way to do it, don't know.
I know a buffer is an allocated bit of memory from C programming, but as for a memoryview I am guessing it's a pyopensll concoction or creation. These test just require these tweaks and I can add pypy support to pyopenssl in portage, once I get a formal fix from you here.
Changed in pyopenssl (Gentoo Linux): | |
status: | Unknown → Incomplete |
> I know a buffer is an allocated bit of memory from C programming, but as for a memoryview
> I am guessing it's a pyopensll concoction or creation.
It is not ... http:// docs.python. org/2/library/ stdtypes. html?highlight= memoryview# memoryview