Exemplo n.º 1
0
    def test_LspServerHandler_step_names(self):
        handler = LspServerHandler(None)
        content = "@step('foo')\ndef foo():\n\tpass\n"
        loader.load_steps(content, 'foo.py')

        req = StepNamesRequest()
        res = handler.GetStepNames(req, None)

        self.assertEqual(res.steps, ['foo'])
Exemplo n.º 2
0
    def test_LspServerHandler_step_names(self):
        handler = LspServerHandler(None)
        self.load_content_steps('''\
        @step('foo')
        def foo():
            pass
        ''')

        req = StepNamesRequest()
        res = handler.GetStepNames(req, None)

        self.assertEqual(res.steps, ['foo'])