File: conftest.py

package info (click to toggle)
rust-kvm-ioctls 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 340 kB
  • sloc: python: 90; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 577 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
27
28
import pytest


PROFILE_CI="ci"
PROFILE_DEVEL="devel"


def pytest_addoption(parser):
    parser.addoption(
        "--profile",
        default=PROFILE_CI,
        choices=[PROFILE_CI, PROFILE_DEVEL],
        help="Profile for running the test: {} or {}".format(
            PROFILE_CI,
            PROFILE_DEVEL
        )
    )


@pytest.fixture
def profile(request):
    return request.config.getoption("--profile")


# This is used for defining global variables in pytest.
def pytest_configure():
    pytest.profile_ci = PROFILE_CI
    pytest.profile_devel = PROFILE_DEVEL