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

        req = StepPositionsRequest(**{'filePath': 'foo.py'})
        res = handler.GetStepPositions(req, None)
        self.assertEqual(res.stepPositions[0].stepValue, 'foo')
Esempio n. 2
0
    def test_LspServerHandler_step_positions(self):
        handler = LspServerHandler(None)
        self.load_content_steps('''\
        @step('foo')
        def foo():
            pass
        ''')

        req = StepPositionsRequest(filePath='foo.py')
        res = handler.GetStepPositions(req, None)
        self.assertEqual(res.stepPositions[0].stepValue, 'foo')