Test cases need to work without twisted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyOpenSSL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The test cases use assertIdentical() and assertNotIdenti
which are not supported by python 2.5.2 of fedora 10
with twisted uninstalled. The attached patch corrects
that.
server_random of client_conn and server_conn must have
the same value. Maybe they aren't identical if
they are buffers (not str), and thus have different
addresses id(), but they need to contain the same
value. This patch corrects it to assertEqual()
The assertRaises() of non-twisted apparently does
not return the exception, so we have to catch it
explicitly. This patch corrects it.
The test cases leave some temporary files "tmp*"
when they run. The attached patch cleans them up.
The patch is against the tip (revno: 107) of trunk
of pyopenssl. Likewise the branch posted to
lp:~rick-fdd/pyopenssl/assert_identical
Related branches
Changed in pyopenssl: | |
status: | Confirmed → Fix Committed |
Changed in pyopenssl: | |
milestone: | none → 0.10 |
Changed in pyopenssl: | |
status: | Fix Committed → Fix Released |
I should probably abandon the idea that the test suite will work either with Twisted's TestCase or the stdlib TestCase (unless I'm willing to actually start testing it against both continuously, which I'm not). So that probably means just using stdlib TestCase everywhere (I'd rather use Twisted's everywhere, but probably more people will be happy the other way :).
The way I'd prefer to do this is to have a base TestCase in OpenSSL which adds whatever features the OpenSSL test suite wants to use (like _Python23TestCa seHelper, but not a mixin).
For features that are too hard to implement for this to be worthwhile (eg temp file cleanup, probably), modifying the test_ methods themselves is probably sensible.