File: test_dicts.py

package info (click to toggle)
python-cattrs 25.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,812 kB
  • sloc: python: 12,236; makefile: 155
file content (11 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
from typing import Any, Dict


def test_any_keys(converter):
    """Dicts with any keys work."""
    assert converter.structure({b"": "1"}, Dict[Any, int]) == {b"": 1}


def test_any_values(converter):
    """Dicts with any values work."""
    assert converter.structure({"1": b"1"}, Dict[int, Any]) == {1: b"1"}