Changeset 488:fe60c3e3ee4b
- Timestamp:
- 09/10/08 12:32:56
(4 months ago)
- Author:
- Brian Warner <warner@allmydata.com>
- branch:
- default
- Message:
testversions.py: tolerate OpenSSL not being installed
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r487 |
r488 |
|
| 5 | 5 | a warning if it is likely that the tests would fail, to remind the |
|---|
| 6 | 6 | user to re-run with -r poll. |
|---|
| | 7 | (Versions.test_required): oops, guard import of OpenSSL on having |
|---|
| | 8 | crypto available, otherwise this test gets an error when OpenSSL |
|---|
| | 9 | is not installed. |
|---|
| 7 | 10 | |
|---|
| 8 | 11 | 2008-09-08 Brian Warner <warner@lothar.com> |
|---|
| r487 |
r488 |
|
| 2 | 2 | from twisted.trial import unittest |
|---|
| 3 | 3 | import time |
|---|
| 4 | | import OpenSSL |
|---|
| 5 | 4 | import twisted |
|---|
| 6 | 5 | from twisted.internet import reactor |
|---|
| | 6 | from foolscap.test.common import crypto_available |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | class Versions(unittest.TestCase): |
|---|
| 9 | 9 | def test_required(self): |
|---|
| | 10 | if not crypto_available: |
|---|
| | 11 | return |
|---|
| | 12 | import OpenSSL |
|---|
| 10 | 13 | ssl_ver = OpenSSL.__version__.split(".") |
|---|
| 11 | 14 | tw_ver = twisted.__version__.split(".") |
|---|