diff --git a/README.md b/README.md index bf4ac2e..2b7f069 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ [![codecov](https://codecov.io/github/DeepPSP/sphinx-emoji-favicon/graph/badge.svg?token=XO53nHzvUM)](https://codecov.io/github/DeepPSP/sphinx-emoji-favicon) [![pytest](https://github.com/DeepPSP/sphinx-emoji-favicon/actions/workflows/run-pytest.yml/badge.svg)](https://github.com/DeepPSP/sphinx-emoji-favicon/actions/workflows/run-pytest.yml) [![license](https://img.shields.io/github/license/DeepPSP/sphinx-emoji-favicon?style=flat-square)](LICENSE) -![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/DeepPSP/sphinx-emoji-favicon) [![downloads](https://img.shields.io/pypi/dm/sphinx-emoji-favicon?style=flat-square)](https://pypistats.org/packages/sphinx-emoji-favicon) +![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/DeepPSP/sphinx-emoji-favicon) ![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/DeepPSP/sphinx-emoji-favicon/latest) A simple sphinx extension to add emoji favicon to your sphinx site. diff --git a/requirements.txt b/requirements.txt index f107711..a89435c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ sphinx docutils +requests emoji diff --git a/test/test_parser.py b/test/test_parser.py index 4298c54..91c101c 100644 --- a/test/test_parser.py +++ b/test/test_parser.py @@ -4,7 +4,13 @@ from emoji import EMOJI_DATA, LANGUAGES from tqdm.auto import tqdm -from sphinx_emoji_favicon import _defalut_twemoji_latest_version, _str2emoji, _url_is_reachable, create_emoji_favicon_meta +from sphinx_emoji_favicon import ( + _defalut_twemoji_latest_version, + _str2emoji, + _to_code_point, + _url_is_reachable, + create_emoji_favicon_meta, +) def test_create_emoji_favicon_meta(): @@ -37,3 +43,8 @@ def test_create_emoji_favicon_meta(): if emoji_alias in _str2emoji: continue assert create_emoji_favicon_meta(emoji_alias) == emoji_favicon_meta + + +def test_to_code_point(): + for emoji_unicode, emoji_data in tqdm(EMOJI_DATA.items(), total=len(EMOJI_DATA)): + assert re.match("^[0-9a-f\\-]+$", _to_code_point(emoji_unicode))