# Path: yaspin/spinners.py
# SPINNERS_DATA = pkgutil.get_data(__name__, "data/spinners.json").decode("utf-8")
# def _hook(dct):


import json
import pytest
from collections import OrderedDict
from yaspin.spinners import SPINNERS_DATA, Spinners
"""
tests.test_spinners
~~~~~~~~~~~~~~~~~~~

Tests for spinners collection.
"""





spinners_dict = OrderedDict(json.loads(SPINNERS_DATA))
test_cases = [(name, v["frames"], v["interval"]) for name, v in spinners_dict.items()]


def test_len():
    assert len(Spinners) == len(spinners_dict)


# Entry example:
# ('balloon', [' ', '.', 'o', 'O', '@', '*', ' '], 140)
@pytest.mark.parametrize("name, frames, interval", test_cases)
def test_spinners(name, frames, interval):

# Path: yaspin/spinners.py
# SPINNERS_DATA = pkgutil.get_data(__name__, "data/spinners.json").decode("utf-8")
# def _hook(dct):


# Path: tests/test_spinners.py
import json
import pytest
from collections import OrderedDict
from yaspin.spinners import SPINNERS_DATA, Spinners

"""
tests.test_spinners
~~~~~~~~~~~~~~~~~~~

Tests for spinners collection.
"""





spinners_dict = OrderedDict(json.loads(SPINNERS_DATA))
test_cases = [(name, v["frames"], v["interval"]) for name, v in spinners_dict.items()]


def test_len():
    assert len(Spinners) == len(spinners_dict)


# Entry example:
# ('balloon', [' ', '.', 'o', 'O', '@', '*', ' '], 140)
@pytest.mark.parametrize("name, frames, interval", test_cases)
def test_spinners(name, frames, interval):

    assert getattr(Spinners, name).frames == frames