def test_discard(self):
    self.set_view_content('#_(inc 1)')
    self.set_selections((2, 2))
    self.view.run_command('tutkain_evaluate', {'scope': 'innermost'})
    self.assertEquals(input('(inc 1)\n'), self.get_print())
    self.eval_context(column=3)
    self.assertEquals('(inc 1)\n', self.server.recv())
    self.server.send('2')
    self.assertEquals(ret('2\n'), self.get_print())
    self.set_view_content('#_(inc 1)')
    self.set_selections((2, 2))
    self.view.run_command('tutkain_evaluate', {'scope': 'outermost'})
    self.assertEquals(input('(inc 1)\n'), self.get_print())
    self.eval_context(column=3)
    self.assertEquals('(inc 1)\n', self.server.recv())
    self.server.send('2')
    self.assertEquals(ret('2\n'), self.get_print())
    self.set_view_content('(inc #_(dec 2) 4)')
    self.set_selections((14, 14))
    self.view.run_command('tutkain_evaluate', {'scope': 'innermost'})
    self.assertEquals(input('(dec 2)\n'), self.get_print())
    self.eval_context(column=8)
    self.assertEquals('(dec 2)\n', self.server.recv())
    self.server.send('1')
    self.assertEquals(ret('1\n'), self.get_print())
    self.set_view_content('#_:a')
    self.set_selections((2, 2))
    self.view.run_command('tutkain_evaluate', {'scope': 'form'})
    self.assertEquals(input(':a\n'), self.get_print())
    self.eval_context(column=3)
    self.assertEquals(':a\n', self.server.recv())
    self.server.send(':a')
    self.assertEquals(ret(':a\n'), self.get_print())
def test_discard(self):
    self.set_view_content('#_(inc 1)')
    self.set_selections((2, 2))
    self.view.run_command('tutkain_evaluate', {'scope': 'innermost'})
    self.assertEquals(input('(inc 1)\n'), self.get_print())
    self.eval_context(column=3)
    self.assertEquals('(inc 1)\n', self.server.recv())
    self.server.send('2')
    self.assertEquals(ret('2\n'), self.get_print())
    self.set_view_content('#_(inc 1)')
    self.set_selections((2, 2))
    self.view.run_command('tutkain_evaluate', {'scope': 'outermost'})
    self.assertEquals(input('(inc 1)\n'), self.get_print())
    self.eval_context(column=3)
    self.assertEquals('(inc 1)\n', self.server.recv())
    self.server.send('2')
    self.assertEquals(ret('2\n'), self.get_print())
    self.set_view_content('(inc #_(dec 2) 4)')
    self.set_selections((14, 14))
    self.view.run_command('tutkain_evaluate', {'scope': 'innermost'})
    self.assertEquals(input('(dec 2)\n'), self.get_print())
    self.eval_context(column=8)
    self.assertEquals('(dec 2)\n', self.server.recv())
    self.server.send('1')
    self.assertEquals(ret('1\n'), self.get_print())
    self.set_view_content('#_:a')
    self.set_selections((2, 2))
    self.view.run_command('tutkain_evaluate', {'scope': 'form'})
    self.assertEquals(input(':a\n'), self.get_print())
    self.eval_context(column=3)
    self.assertEquals(':a\n', self.server.recv())
    self.server.send(':a')
    self.assertEquals(ret(':a\n'), self.get_print())