Commit 132f8eb4 authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by Vincent Michel

pepu: add command line argument to test specific pepu hostname

parent e6276f0b
# -*- 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_addoption(parser):
parser.addoption("--pepu", help="pepu host name")
def pytest_collection_modifyitems(config, items):
if config.getoption('--pepu') is None:
for item in list(items):
if 'pepu' in item.keywords:
items.remove(item)
......@@ -10,10 +10,13 @@ Run with:
import pytest
from bliss.controllers.pepu import PEPU, Signal, Trigger
pytestmark = pytest.mark.pepu
@pytest.fixture
def pepu():
pepu = PEPU('test', {'tcp': {'url': 'pepudcm2'}})
def pepu(request):
hostname = request.config.getoption('--pepu')
pepu = PEPU('test', {'tcp': {'url': hostname}})
try:
pepu.calc_channels[1].formula = '1.5'
pepu.calc_channels[2].formula = '-1.5'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment