blob: 3b303aca89a422ef38ca5ec304046e7b398cac8e [file] [log] [blame]
Paul Kehrer7e4bc6d2013-12-24 22:23:53 -06001# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10# implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14from __future__ import absolute_import, division, print_function
15
16import pretend
17
18import pytest
19
20from .skip_check import skip_check
21
22
23class FakeInterface(object):
24 pass
25
26
27def test_skip_check():
28 item = pretend.stub(keywords=["fake_name"], funcargs={"backend": True})
29 with pytest.raises(pytest.skip.Exception) as exc_info:
30 skip_check("fake_name", FakeInterface, item)
31 assert exc_info.value.args[0] == "Backend does not support fake_name"