Skip to content

Commit

Permalink
Add test that C extension is correctly loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou committed Feb 25, 2025
1 parent 426b7ac commit b241d39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_quoting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from hypothesis import assume, example, given, note
from hypothesis import strategies as st

import yarl
from yarl._quoting import NO_EXTENSIONS
from yarl._quoting_py import _Quoter as _PyQuoter
from yarl._quoting_py import _Unquoter as _PyUnquoter
Expand Down Expand Up @@ -38,6 +39,11 @@ def unquoter(request):
unquoter_ids = ["PyUnquoter"]


@pytest.mark.skipif(NO_EXTENSIONS, reason="Extensions available but not imported")
def test_quoting_c_loaded():
assert "_quoting_c" in dir(yarl)


def hexescape(char):
"""Escape char as RFC 2396 specifies"""
hex_repr = hex(ord(char))[2:].upper()
Expand Down

0 comments on commit b241d39

Please sign in to comment.