File: test_postponed_annotations.py

package info (click to toggle)
python-omegaconf 2.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,244 kB
  • sloc: python: 26,413; makefile: 38; sh: 11
file content (19 lines) | stat: -rw-r--r-- 621 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys

from pytest import mark


@mark.skipif(sys.version_info < (3, 7), reason="requires Python 3.7")
def test_simple_types_class_postponed() -> None:
    # import from a module which has `from __future__ import annotations`
    from tests.examples.dataclass_postponed_annotations import simple_types_class

    simple_types_class()


@mark.skipif(sys.version_info < (3, 7), reason="requires Python 3.7")
def test_conversions_postponed() -> None:
    # import from a module which has `from __future__ import annotations`
    from tests.examples.dataclass_postponed_annotations import conversions

    conversions()