Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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

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

3# 

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

5from .steps import test_steps, cross_steps_fixture, CROSS_STEPS_MARK # noqa 

6from .steps_generator import optional_step, one_fixture_per_step # noqa 

7from .steps_parametrizer import StepsDataHolder, depends_on # noqa 

8 

9try: 

10 # -- Distribution mode -- 

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

12 from ._version import version as __version__ 

13except ImportError: 

14 # -- Source mode -- 

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

16 from setuptools_scm import get_version as _gv 

17 from os import path as _path 

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

19 

20__all__ = [ 

21 '__version__', 

22 # the submodules 

23 'steps', 

24 'steps_generator', 

25 'steps_parametrizer', 

26 'steps_harvest', 

27 'steps_harvest_df_utils', 

28 # all symbols imported above 

29 # -- for fixtures 

30 'cross_steps_fixture', 

31 'CROSS_STEPS_MARK', 

32 # -- for tests 

33 'test_steps', 

34 # ---- specific to parametrizer mode 

35 'StepsDataHolder', 

36 'depends_on', 

37 # ---- specific to generator mode 

38 'optional_step', 

39 'one_fixture_per_step' 

40 ] 

41 

42try: 

43 from pytest_harvest import get_all_pytest_fixture_names as _ # noqa 

44except ImportError: 

45 # pytest-harvest is not installed 

46 pass 

47else: 

48 from .steps_harvest import handle_steps_in_results_dct, remove_step_from_test_id, \ 

49 get_all_pytest_param_names_except_step_id 

50 from .steps_harvest_df_utils import pivot_steps_on_df, get_flattened_multilevel_columns, \ 

51 flatten_multilevel_columns, handle_steps_in_results_df 

52 

53 __all__ = __all__ + [ 

54 # harvest-related 

55 'handle_steps_in_results_dct', 'remove_step_from_test_id', 'get_all_pytest_param_names_except_step_id', 

56 'pivot_steps_on_df', 'get_flattened_multilevel_columns', 'flatten_multilevel_columns', 

57 'handle_steps_in_results_df' 

58 ]