File: test_annotations.py

package info (click to toggle)
python-web-poet 0.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 908 kB
  • sloc: python: 6,112; makefile: 19
file content (14 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import get_type_hints

import pytest

import web_poet

EXPORTED = [getattr(web_poet, t) for t in dir(web_poet) if not t.startswith("_")]
EXPORTED_TYPES = [t for t in EXPORTED if isinstance(t, type)]


@pytest.mark.parametrize("t", EXPORTED_TYPES)
def test_get_type_hints(t: type) -> None:
    """Test that get_type_hints() works for all exported types."""
    get_type_hints(t)