File: _testtools.py

package info (click to toggle)
python-plumbum 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,300 kB
  • sloc: python: 10,016; makefile: 130; sh: 8
file content (26 lines) | stat: -rw-r--r-- 663 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import annotations

import os
import platform
import sys

import pytest

skip_without_chown = pytest.mark.skipif(
    not hasattr(os, "chown"), reason="os.chown not supported"
)

skip_without_tty = pytest.mark.skipif(not sys.stdin.isatty(), reason="Not a TTY")

skip_on_windows = pytest.mark.skipif(
    sys.platform == "win32", reason="Windows not supported for this test (yet)"
)

xfail_on_windows = pytest.mark.xfail(
    sys.platform == "win32", reason="Windows not supported for this test (yet)"
)

xfail_on_pypy = pytest.mark.xfail(
    platform.python_implementation() == "PyPy",
    reason="PyPy is currently not working on this test!",
)