'If nowait is specified, we expect an error to be raised rather
than blocking.'

@requires_threading
@skipUnlessDBFeature('has_select_for_update_nowait')
@unittest.skipIf((sys.version_info[:3] == (2, 6, 1)), 'Python    version    is    2.6.1')
def test_nowait_raises_error_on_block(self):

    self.start_blocking_transaction()
    status = []
    thread = threading.Thread(target=self.run_select_for_update, args=(status,), kwargs={'nowait': True})
    thread.start()
    time.sleep(1)
    thread.join()
    self.end_blocking_transaction()
    self.assertIsInstance(status[(-1)], DatabaseError)
