How to use the getgauge.registry.registry.clear 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_python.py View on Github external
from getgauge.messages.messages_pb2 import Message
from getgauge.registry import registry, MessagesStore, ScreenshotsStore
from getgauge.python import (Messages, DataStore, DataStoreFactory, DictObject,
                             DataStoreContainer, data_store, Table, Specification,
                             Scenario, Step, ExecutionContext,
                             create_execution_context_from)
from uuid import uuid1
import os
import tempfile
try:
    from collections.abc import MutableMapping
except ImportError:
    from collections import MutableMapping

registry.clear()


class MessagesTests(TestCase):
    def test_pending_messages(self):
        messages = ['HAHAHAH', 'HAHAHAH1', 'HAHAHAH2', 'HAHAHAH3']
        for message in messages:
            Messages.write_message(message)
        pending_messages = MessagesStore.pending_messages()
        self.assertEqual(messages, pending_messages)

    def test_clear(self):
        messages = ['HAHAHAH', 'HAHAHAH1', 'HAHAHAH2', 'HAHAHAH3']
        for message in messages:
            Messages.write_message(message)
        MessagesStore.clear()
        pending_messages = MessagesStore.pending_messages()
github getgauge / gauge-python / tests / test_handlers.py View on Github external
def setUp(self):
        registry.clear()
        self.setUpPyfakefs()
github getgauge / gauge-python / tests / test_lsp_server.py View on Github external
def setUp(self):
        registry.clear()
        self.setUpPyfakefs()
github getgauge / gauge-python / getgauge / processor.py View on Github external
def process_execution_starting_request(request, clear=True):
    if clear:
        registry.clear()
        load_impls(get_step_impl_dirs())
    execution_info = create_execution_context_from(
        request.currentExecutionInfo)
    response = run_hook(request, registry.before_suite(), execution_info)
    _add_message_and_screenshots(response)
    return response