How to use the getgauge.registry.registry function in getgauge

To help you get started, we’ve selected a few getgauge examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getgauge / gauge-python / tests / test_lsp_server.py View on Github external
def test_LspServerHandler_cache_file(self):
        handler = LspServerHandler(None)
        self.load_content_steps('''\
        from getgauge.python import step

        @step('Vowels in English language are .')
        def foo(vowels):
            print(vowels)
        ''')

        self.assertTrue(registry.is_implemented(
            'Vowels in English language are {}.'))

        content = dedent('''\
        from getgauge.python import step

        @step('get lost!')
        def foo():
            pass
        ''')
        req = CacheFileRequest(
            content=content, filePath='foo.py', status=CacheFileRequest.CHANGED)
        handler.CacheFile(req, None)

        self.assertTrue(registry.is_implemented('get lost!'))
github getgauge / gauge-python / getgauge / static_loader.py View on Github external
def reload_steps(file_path, content=None):
    pf = PythonFile.parse(file_path, content)
    if pf:
        registry.remove_steps(file_path)
        load_steps(pf)
github getgauge / gauge-python / getgauge / python.py View on Github external
def after_suite(obj=None):
    return _define_wrapper(obj, registry.add_after_suite)