aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/yarl/tests/test_cache.py
blob: 22141dd08540b13143ac1a2b650d7b0b5c37f9b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import yarl

# Don't check the actual behavior but make sure that calls are allowed


def teardown_module():
    yarl.cache_configure()


def test_cache_clear() -> None:
    yarl.cache_clear()


def test_cache_info() -> None:
    info = yarl.cache_info()
    assert info.keys() == {"idna_encode", "idna_decode"}


def test_cache_configure_default() -> None:
    yarl.cache_configure()


def test_cache_configure_None() -> None:
    yarl.cache_configure(idna_encode_size=None, idna_decode_size=None)


def test_cache_configure_explicit() -> None:
    yarl.cache_configure(idna_encode_size=128, idna_decode_size=128)