# Path: yaspin/constants.py
# COLOR_MAP = {
#     # name: type
#     "blink": "attrs",
#     "bold": "attrs",
#     "concealed": "attrs",
#     "dark": "attrs",
#     "reverse": "attrs",
#     "underline": "attrs",
#     "blue": "color",
#     "cyan": "color",
#     "green": "color",
#     "magenta": "color",
#     "red": "color",
#     "white": "color",
#     "yellow": "color",
#     "on_blue": "on_color",
#     "on_cyan": "on_color",
#     "on_green": "on_color",
#     "on_grey": "on_color",
#     "on_magenta": "on_color",
#     "on_red": "on_color",
#     "on_white": "on_color",
#     "on_yellow": "on_color",
# }
# 
# Path: yaspin/signal_handlers.py
# def default_handler(signum, frame, spinner):  # pylint: disable=unused-argument
#     """Signal handler, used to gracefully shut down the ``spinner`` instance
#     when specified signal is received by the process running the ``spinner``.
# 
#     ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
#     function for more details.
#     """
#     spinner.fail()
#     spinner.stop()
#     sys.exit(0)
# 
# def fancy_handler(signum, frame, spinner):  # pylint: disable=unused-argument
#     """Signal handler, used to gracefully shut down the ``spinner`` instance
#     when specified signal is received by the process running the ``spinner``.
# 
#     ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
#     function for more details.
#     """
#     spinner.red.fail("✘")
#     spinner.stop()
#     sys.exit(0)


import signal
import sys
import pytest
from yaspin.constants import COLOR_MAP
from yaspin.signal_handlers import default_handler, fancy_handler
        # Success
        b"OK",
        u"OK",
        b"\xe2\x9c\x94",
        u"✔",
        # Sun
        b"\xe2\x98\x80\xef\xb8\x8f",
        u"☀️",
        # Spark
        b"\xf0\x9f\x92\xa5",
        u"💥",
    ],
)
def final_text(request):
    return request.param


@pytest.fixture(
    scope="session",
    params=[
        None,
        {signal.SIGUSR1: signal.SIG_DFL},
        {signal.SIGTERM: signal.SIG_IGN},
        {signal.SIGTERM: signal.default_int_handler},
        {signal.SIGHUP: default_handler},
        {signal.SIGINT: fancy_handler},
        {signal.SIGINT: lambda signum, frame: sys.exit(1)},
        {
            signal.SIGUSR1: signal.SIG_DFL,
            signal.SIGTERM: signal.SIG_IGN,

# Path: yaspin/constants.py
# COLOR_MAP = {
#     # name: type
#     "blink": "attrs",
#     "bold": "attrs",
#     "concealed": "attrs",
#     "dark": "attrs",
#     "reverse": "attrs",
#     "underline": "attrs",
#     "blue": "color",
#     "cyan": "color",
#     "green": "color",
#     "magenta": "color",
#     "red": "color",
#     "white": "color",
#     "yellow": "color",
#     "on_blue": "on_color",
#     "on_cyan": "on_color",
#     "on_green": "on_color",
#     "on_grey": "on_color",
#     "on_magenta": "on_color",
#     "on_red": "on_color",
#     "on_white": "on_color",
#     "on_yellow": "on_color",
# }
# 
# Path: yaspin/signal_handlers.py
# def default_handler(signum, frame, spinner):  # pylint: disable=unused-argument
#     """Signal handler, used to gracefully shut down the ``spinner`` instance
#     when specified signal is received by the process running the ``spinner``.
# 
#     ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
#     function for more details.
#     """
#     spinner.fail()
#     spinner.stop()
#     sys.exit(0)
# 
# def fancy_handler(signum, frame, spinner):  # pylint: disable=unused-argument
#     """Signal handler, used to gracefully shut down the ``spinner`` instance
#     when specified signal is received by the process running the ``spinner``.
# 
#     ``signum`` and ``frame`` are mandatory arguments. Check ``signal.signal``
#     function for more details.
#     """
#     spinner.red.fail("✘")
#     spinner.stop()
#     sys.exit(0)


# Path: tests/conftest.py
import signal
import sys
import pytest
from yaspin.constants import COLOR_MAP
from yaspin.signal_handlers import default_handler, fancy_handler

        # Success
        b"OK",
        u"OK",
        b"\xe2\x9c\x94",
        u"✔",
        # Sun
        b"\xe2\x98\x80\xef\xb8\x8f",
        u"☀️",
        # Spark
        b"\xf0\x9f\x92\xa5",
        u"💥",
    ],
)
def final_text(request):
    return request.param


@pytest.fixture(
    scope="session",
    params=[
        None,
        {signal.SIGUSR1: signal.SIG_DFL},
        {signal.SIGTERM: signal.SIG_IGN},
        {signal.SIGTERM: signal.default_int_handler},
        {signal.SIGHUP: default_handler},
        {signal.SIGINT: fancy_handler},
        {signal.SIGINT: lambda signum, frame: sys.exit(1)},
        {
            signal.SIGUSR1: signal.SIG_DFL,
            signal.SIGTERM: signal.SIG_IGN,

            signal.SIGHUP: default_handler,