'Context.term won\'t close sockets'

def test_term_noclose(self):

    ctx = self.Context()
    s = ctx.socket(zmq.REQ)
    self.assertFalse(s.closed)
    t = Thread(target=ctx.term)
    t.start()
    t.join(timeout=0.1)
    self.assertTrue(t.is_alive(), 'Context    should    be    waiting')
    s.close()
    t.join(timeout=0.1)
    self.assertFalse(t.is_alive(), 'Context    should    have    closed')
