python/tests/conftest.py
sgoudham e439afbdf3 test: refactor to use v0.2.0 palette json link
This brings us closer to a single source
of truth being the Catppuccin palette json.

This fixture can be also now be used for
auto-generating the library code which is
planned in #2.
2023-01-10 00:29:36 +00:00

16 lines
403 B
Python

import json
from typing import Dict
from urllib.request import urlopen
import pytest
ColourJSON = Dict[str, str]
FlavourJSON = Dict[str, ColourJSON]
PaletteJSON = Dict[str, FlavourJSON]
@pytest.fixture
def palette_json() -> PaletteJSON:
url = "https://raw.githubusercontent.com/catppuccin/palette/ec883a880bc24d43a01c78e7d9602abf6b1780dd/palette.json"
return json.loads(urlopen(url).read())