Debian Codegraph @

tests/conftest.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2010, 2011, 2012, 2013 Sebastian Wiesner <[email protected]>
3
4 # This library is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU Lesser General Public License as published by the
6 # Free Software Foundation; either version 2.1 of the License, or (at your
7 # option) any later version.
8
9 # This library is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
12 # for more details.
13
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this library; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18 # isort: THIRDPARTY
19 import pytest
20
21 # isort: LOCAL
22 import pyudev
23
24 pytest_plugins = [
25 str("tests.plugins.fake_monitor"),
26 str("tests.plugins.mock_libudev"),
27 str("tests.plugins.travis"),
28 ]
29
30
31 @pytest.fixture
32 def context(request):
33 """
34 Return a useable :class:`pyudev.Context` object.
35 """
36 try:
37 return pyudev.Context()
38 except ImportError:
39 pytest.skip("udev not available")