conftest.py 503 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
# -*- coding: utf-8 -*-
#
# This file is part of the bliss project
#
# Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.

import pytest


def pytest_collection_modifyitems(config, items):
Vincent Michel's avatar
Vincent Michel committed
12
    try:
13
        if config.getoption("--pepu"):
Vincent Michel's avatar
Vincent Michel committed
14
15
16
17
18
            return
    except ValueError:
        return
    # Remove pepu tests if no pepu option is provided
    for item in list(items):
19
        if "pepu" in item.keywords:
Vincent Michel's avatar
Vincent Michel committed
20
            items.remove(item)