Opened 14 years ago
Closed 14 years ago
#3111 enhancement closed fixed (fixed)
skip unit tests if they depend on absent 3rd-party library
Reported by: | zooko | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Keywords: | test |
Cc: | Branch: |
branches/without-openssl-3111
branch-diff, diff-cov, branch-cov, buildbot |
|
Author: | exarkun |
Description
If you run twisted unit tests without installing pyOpenSSL and pyCrypto, then you get errors like these:
=============================================================================== [ERROR]: twisted.conch.test.test_userauth Traceback (most recent call last): File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/trial/runner.py", line 546, in loadPackage module = modinfo.load() File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/python/modules.py", line 380, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/python/modules.py", line 618, in moduleLoader return self._moduleLoader(modname) File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/python/reflect.py", line 426, in namedAny topLevelPackage = _importAndCheckStack(trialname) File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/conch/test/test_userauth.py", line 8, in <module> from twisted.conch.ssh import userauth File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/conch/ssh/userauth.py", line 19, in <module> import keys, transport, service File "/Users/wonwinmcbrootles/playground/twisted/easy_install-1286-4/twisted/conch/ssh/keys.py", line 19, in <module> from Crypto.Cipher import DES3 exceptions.ImportError: No module named Crypto.Cipher
It would be nicer if you got SkipTests for those.
Change History (7)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
author: | → exarkun |
---|---|
Branch: | → branches/without-openssl-3111 |
(In [24702]) Branching to 'without-openssl-3111'
comment:3 Changed 14 years ago by
Keywords: | review added |
---|---|
Owner: | Glyph deleted |
comment:4 Changed 14 years ago by
comment:5 Changed 14 years ago by
Keywords: | review removed |
---|---|
Owner: | set to Jean-Paul Calderone |
Fine, +1.
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [24770]) Merge without-openssl-3111
Author: exarkun Reviewer: therve Fixes: #3111
Adjust almost all of the unit tests so that if either PyCrypto or pyOpenSSL is unavailable, tests for functionality which relies on them are skipped. This removes a number of mostly uninformative failures from platforms such as PyPy (where these modules are never available atm) and cleans up the test results on CPython when one of these dependencies is missing.
comment:7 Changed 11 years ago by
Owner: | Jean-Paul Calderone deleted |
---|
Note: See
TracTickets for help on using
tickets.
bzrlib has a really nice way of doing this. They distinguish between "skipping due to OS missing features" and "skipping due to lack of dependencies". This makes it easier to see which ones you can fix.