[pypy-svn] r30737 - pypy/dist/pypy/module/_ssl/test
rhymes at codespeak.net
rhymes at codespeak.net
Sat Jul 29 19:57:14 CEST 2006
Author: rhymes
Date: Sat Jul 29 19:57:12 2006
New Revision: 30737
Modified:
pypy/dist/pypy/module/_ssl/test/test_ssl.py
Log:
test RAND_xxx tuned accordingly to optional existence of RAND_xxx functions
Modified: pypy/dist/pypy/module/_ssl/test/test_ssl.py
==============================================================================
--- pypy/dist/pypy/module/_ssl/test/test_ssl.py (original)
+++ pypy/dist/pypy/module/_ssl/test/test_ssl.py Sat Jul 29 19:57:12 2006
@@ -28,22 +28,28 @@
assert isinstance(_ssl.SSL_ERROR_INVALID_ERROR_CODE, int)
def test_RAND_add(self):
- from _ssl import RAND_add
- raises(TypeError, RAND_add, 4, 4)
- raises(TypeError, RAND_add, "xyz", "zyx")
- RAND_add("xyz", 1.2345)
+ import _ssl
+ if not hasattr(_ssl, "RAND_add"):
+ skip("RAND_add is not available on this machine")
+ raises(TypeError, _ssl.RAND_add, 4, 4)
+ raises(TypeError, _ssl.RAND_add, "xyz", "zyx")
+ _ssl.RAND_add("xyz", 1.2345)
def test_RAND_status(self):
import _ssl
+ if not hasattr(_ssl, "RAND_status"):
+ skip("RAND_status is not available on this machine")
_ssl.RAND_status()
def test_RAND_egd(self):
- from _ssl import RAND_egd
- raises(TypeError, RAND_egd, 4)
+ import _ssl
+ if not hasattr(_ssl, "RAND_egd"):
+ skip("RAND_egd is not available on this machine")
+ raises(TypeError, _ssl.RAND_egd, 4)
# you need to install http://egd.sourceforge.net/ to test this
# execute "egd.pl entropy" in the current dir
- RAND_egd("entropy")
+ _ssl.RAND_egd("entropy")
def test_connect(self):
import socket
More information about the Pypy-commit
mailing list