def test_ns(self):
    self.set_view_content('(ns foo.bar) (ns baz.quux) (defn x [y] y)')
    self.set_selections((0, 0))
    self.view.run_command('tutkain_evaluate', {'scope': 'ns'})
    self.assertEquals(input('(ns foo.bar)\n'), self.get_print())
    self.eval_context(ns=edn.Symbol('foo.bar'))
    self.assertEquals(input('(ns baz.quux)\n'), self.get_print())
    self.eval_context(column=14, ns=edn.Symbol('foo.bar'))
    self.assertEquals('(ns foo.bar)\n', self.server.recv())
    self.assertEquals('(ns baz.quux)\n', self.server.recv())
    self.server.send('nil')
    self.assertEquals(ret('nil\n'), self.get_print())
    self.server.send('nil')
    self.assertEquals(ret('nil\n'), self.get_print())
def test_ns(self):
    self.set_view_content('(ns foo.bar) (ns baz.quux) (defn x [y] y)')
    self.set_selections((0, 0))
    self.view.run_command('tutkain_evaluate', {'scope': 'ns'})
    self.assertEquals(input('(ns foo.bar)\n'), self.get_print())
    self.eval_context(ns=edn.Symbol('foo.bar'))
    self.assertEquals(input('(ns baz.quux)\n'), self.get_print())
    self.eval_context(column=14, ns=edn.Symbol('foo.bar'))
    self.assertEquals('(ns foo.bar)\n', self.server.recv())
    self.assertEquals('(ns baz.quux)\n', self.server.recv())
    self.server.send('nil')
    self.assertEquals(ret('nil\n'), self.get_print())
    self.server.send('nil')
    self.assertEquals(ret('nil\n'), self.get_print())