def testExecuteAndUnpackWhenError(self):
    self.mox.StubOutWithMock(self.asr, 'Execute')

    mock_ret = self.mox.CreateMockAnything()
    mock_item = self.mox.CreateMockAnything()
    mock_ret = self.mox.CreateMockAnything()

    unpack_fmt = 'sbi'
    args = ['some value']
    osa_script = 'some script %s'

    self.asr.Execute(osa_script, args).AndReturn(mock_ret)
    mock_ret.numberOfItems().AndReturn(len(unpack_fmt) + 1)
    self.asr.Execute(osa_script, args).AndReturn(mock_ret)
    mock_ret.numberOfItems().AndReturn(len(unpack_fmt) + 1)
    mock_ret.descriptorAtIndex_(1).AndReturn(mock_item)

    self.mox.ReplayAll()
    self.assertRaises(
        applescript.Error,
        self.asr.ExecuteAndUnpack, osa_script, unpack_fmt, args)
    unpack_fmt = 'xsbi'
    self.assertRaises(
        applescript.Error,
        self.asr.ExecuteAndUnpack, osa_script, unpack_fmt, args)
    self.mox.VerifyAll()
Now that the values have a random number attached,
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/applescript_test.py/AppleScriptRunnerTest.testExecuteAndUnpackWhenError--crossover with--dataset/ETHPy150Open Yelp/mrjob/mrjob/examples/mr_log_sampler.py/MRLogSampler.reducer