Coverage for src/pytest_cases/__init__.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2024-09-26 21:52 +0000

1# Authors: Sylvain MARIE <sylvain.marie@se.com> 

2# + All contributors to <https://github.com/smarie/python-pytest-cases> 

3# 

4# License: 3-clause BSD, <https://github.com/smarie/python-pytest-cases/blob/master/LICENSE> 

5from .common_pytest_lazy_values import lazy_value, is_lazy 

6from .common_others import unfold_expected_err, assert_exception, AUTO 

7 

8from .fixture_core1_unions import fixture_union, NOT_USED, unpack_fixture, ignore_unused 

9from .fixture_core2 import pytest_fixture_plus, fixture_plus, fixture, param_fixtures, param_fixture 

10from .fixture_parametrize_plus import pytest_parametrize_plus, parametrize_plus, parametrize, fixture_ref 

11 

12from .case_funcs import case, copy_case_info, set_case_id, get_case_id, get_case_marks, \ 

13 get_case_tags, matches_tag_query, is_case_class, is_case_function 

14from .case_parametrizer_new import parametrize_with_cases, THIS_MODULE, get_all_cases, get_parametrize_args, \ 

15 get_current_case_id, get_current_cases, get_current_params, CasesCollectionWarning 

16 

17try: 

18 # -- Distribution mode -- 

19 # import from _version.py generated by setuptools_scm during release 

20 from ._version import version as __version__ 

21except ImportError: 

22 # -- Source mode -- 

23 # use setuptools_scm to get the current version from src using git 

24 from setuptools_scm import get_version as _gv 

25 from os import path as _path 

26 __version__ = _gv(_path.join(_path.dirname(__file__), _path.pardir, _path.pardir)) 

27 

28 

29AUTO2 = AUTO 

30"""Deprecated symbol, for retrocompatibility. Will be dropped soon.""" 

31 

32 

33__all__ = [ 

34 '__version__', 

35 # the submodules 

36 'case_funcs', 'case_parametrizer_new', 

37 'common_mini_six', 'common_others', 'common_pytest', 'common_pytest_lazy_values', 'common_pytest_marks', 

38 'filters', 

39 'fixture__creation', 'fixture_core1_unions', 'fixture_core2', 'fixture_parametrize_plus', 

40 

41 # all symbols imported above 

42 'unfold_expected_err', 'assert_exception', 

43 

44 # --fixture core1 

45 'fixture_union', 'NOT_USED', 'unpack_fixture', 'ignore_unused', 

46 # -- fixture core2 

47 'pytest_fixture_plus', 'fixture_plus', 'fixture', 'param_fixtures', 'param_fixture', 

48 # -- fixture parametrize plus 

49 'pytest_parametrize_plus', 'parametrize_plus', 'parametrize', 'fixture_ref', 'lazy_value', 'is_lazy', 

50 

51 # V2 symbols 

52 'AUTO', 'AUTO2', 

53 # case functions 

54 'case', 'copy_case_info', 'set_case_id', 'get_case_id', 'get_case_marks', 

55 'get_case_tags', 'matches_tag_query', 'is_case_class', 'is_case_function', 

56 # test functions 

57 'get_all_cases', 'parametrize_with_cases', 'THIS_MODULE', 'get_parametrize_args', 'get_current_case_id', 

58 'get_current_cases', 'get_current_params', 'CasesCollectionWarning' 

59]