How to use the gdbgui.backend.setup_backend function in gdbgui

To help you get started, we’ve selected a few gdbgui 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 cs01 / gdbgui / tests / test_app.py View on Github external
Unit tests

Run from top level directory: ./tests/test_app.py

See more on testing Flask apps: http://flask.pocoo.org/docs/0.11/testing/
"""

import unittest
from gdbgui import backend
import sys
from flask_socketio import send, SocketIO  # type: ignore


PYTHON3 = sys.version_info.major == 3

backend.setup_backend(testing=True)
socketio = backend.socketio


class TestWebsockets(unittest.TestCase):
    @classmethod
    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_connect(self):
        app = backend.app
        socketio = SocketIO()

        @socketio.on("connect")
github cs01 / gdbgui / tests / test_app.py View on Github external
def test_same_port(self):
        backend.setup_backend(testing=True)