def test_evaluate_dialect(self):
    self.view.run_command('tutkain_evaluate', {'code': '(random-uuid)', 'dialect': 'cljs'})
    self.assertRaises(queue.Empty, (lambda : self.client.printq.get_nowait()))
    self.assertRaises(queue.Empty, (lambda : self.server.recvq.get_nowait()))
    self.view.run_command('tutkain_evaluate', {'code': '(Integer/parseInt "42")', 'dialect': 'clj'})
    self.assertEquals(input('(Integer/parseInt "42")\n'), self.get_print())
    self.eval_context()
    self.assertEquals('(Integer/parseInt "42")\n', self.server.recv())
    self.server.send('42')
    self.assertEquals(ret('42\n'), self.get_print())
def test_evaluate_dialect(self):
    self.view.run_command('tutkain_evaluate', {'code': '(random-uuid)', 'dialect': 'cljs'})
    self.assertRaises(queue.Empty, (lambda : self.client.printq.get_nowait()))
    self.assertRaises(queue.Empty, (lambda : self.server.recvq.get_nowait()))
    self.view.run_command('tutkain_evaluate', {'code': '(Integer/parseInt "42")', 'dialect': 'clj'})
    self.assertEquals(input('(Integer/parseInt "42")\n'), self.get_print())
    self.eval_context()
    self.assertEquals('(Integer/parseInt "42")\n', self.server.recv())
    self.server.send('42')
    self.assertEquals(ret('42\n'), self.get_print())