File: _pytest_utils.py

package info (click to toggle)
python-executing 2.2.0-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,860 kB
  • sloc: python: 10,235; sh: 48; makefile: 10
file content (16 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys



def is_pytest_compatible() -> bool:
    """ returns true if executing can be used for expressions inside assert statements which are rewritten by pytest
    """
    if sys.version_info < (3, 11):
        return False

    try:
        import pytest
    except ImportError:
        return False

    return pytest.version_tuple >= (8, 3, 4)