diff --git a/tests/controllers_hw/conftest.py b/tests/controllers_hw/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..cdd647ab8c7e0fb9f346ff184a15fe162c69242e --- /dev/null +++ b/tests/controllers_hw/conftest.py @@ -0,0 +1,21 @@ +# -*- 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) + + diff --git a/tests/controllers_hw/pepu.py b/tests/controllers_hw/pepu.py index 29163c92f629819885218d608ff617c41a2cd983..248b952d14f93c34580d432004fd93b31f79d52e 100644 --- a/tests/controllers_hw/pepu.py +++ b/tests/controllers_hw/pepu.py @@ -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'