File: test-assert-type.yml

package info (click to toggle)
pytest-mypy-plugins 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 296 kB
  • sloc: python: 1,287; sh: 15; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- case: assert_type
  main: |
    from typing_extensions import assert_type

    def x() -> int:
        return 1

    assert_type(x(), int)

- case: assert_type_error
  mypy_config: |
    warn_unused_ignores = true
  main: |
    from typing_extensions import assert_type

    def x() -> int:
        return 1

    assert_type(x(), str)  # type: ignore