def test_status_exceptions_can_be_pickled_across_processes(self):
try:
import jobrunner
except ImportError:
raise SkipTest("jobrunner not installed, skipping")
runner = jobrunner.JobRunner(jobrunner.JobRunner.RUN_MODE_MULTIPROCESS,
runnables=[raise_an_exception],
auto_assert=False)
result = runner.run()[0]
self.assertTrue(result.exception_occured())
self.assertEqual(str(result.err_type), str(nifpga.FifoTimeoutError))
self.assertIn("session: 0xbeef", result.err_class)
if python_version == 2:
self.assertIn("a bogus string argument: 'I am a string'", result.err_class)
else:
self.assertIn("a bogus string argument: b'I am a string'", result.err_class)
评论列表
文章目录