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

        req = StepNameRequest(**{'stepValue': 'foo'})
        res = handler.GetStepName(req, None)

        self.assertTrue(res.isStepPresent)
        self.assertEqual(res.fileName, 'foo.py')
示例#2
0
    def test_LspServerHandler_step_name(self):
        handler = LspServerHandler(None)
        self.load_content_steps('''\
        @step('foo')
        def foo():
            pass
        ''')

        req = StepNameRequest(stepValue='foo')
        res = handler.GetStepName(req, None)

        self.assertTrue(res.isStepPresent)
        self.assertEqual(res.fileName, 'foo.py')