def test_eval_context_file(self):
    file = os.path.join(tempfile.gettempdir(), 'my.clj')
    self.view.retarget(file)
    self.set_view_content('(inc 1)')
    self.set_selections((0, 0))
    self.view.run_command('tutkain_evaluate', {'scope': 'outermost'})
    self.assertEquals(input('(inc 1)\n'), self.get_print())
    self.eval_context(file=file)
    self.assertEquals('(inc 1)\n', self.server.recv())
    self.server.send('2')
    self.assertEquals(ret('2\n'), self.get_print())
def test_eval_context_file(self):
    file = os.path.join(tempfile.gettempdir(), 'my.clj')
    self.view.retarget(file)
    self.set_view_content('(inc 1)')
    self.set_selections((0, 0))
    self.view.run_command('tutkain_evaluate', {'scope': 'outermost'})
    self.assertEquals(input('(inc 1)\n'), self.get_print())
    self.eval_context(file=file)
    self.assertEquals('(inc 1)\n', self.server.recv())
    self.server.send('2')
    self.assertEquals(ret('2\n'), self.get_print())