special-case pypy

This commit is contained in:
meejah 2019-12-30 20:25:59 -07:00
parent 13350d60c2
commit 00373fc211
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import sys
import os.path, time
from six.moves import cStringIO as StringIO
from twisted.trial import unittest
@ -60,7 +60,11 @@ class BackupDB(unittest.TestCase):
bdb = backupdb.get_backupdb(where, stderr_f)
self.failUnlessEqual(bdb, None)
stderr = stderr_f.getvalue()
self.failUnlessIn("unable to open database file", stderr)
# the error-message is different under PyPy ... not sure why?
if 'pypy' in sys.version.lower():
self.failUnlessIn("Could not open database", stderr)
else:
self.failUnlessIn("unable to open database file", stderr)
def writeto(self, filename, data):

View File

@ -421,10 +421,10 @@ def _render_section_values(values):
class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
def setUp(self):
if 'pypy' in sys.version.lower():
self.skip = "pypy can't run these, due to SSL errors (ee key too tiny)"
if 'pypy' in sys.version.lower():
skip = "pypy can't run these, due to SSL errors (ee key too tiny)"
def setUp(self):
self.port_assigner = SameProcessStreamEndpointAssigner()
self.port_assigner.setUp()
self.addCleanup(self.port_assigner.tearDown)