File: test_connection.py

package info (click to toggle)
python-pyxs 0.4.2~git20190115.97f14313-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 332 kB
  • sloc: python: 1,196; makefile: 93
file content (16 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-

from __future__ import absolute_import

import pytest

from pyxs.connection import _XenBusTransport, _UnixSocketTransport
from pyxs.exceptions import ConnectionError


@pytest.mark.parametrize("_transport", [
    _XenBusTransport, _UnixSocketTransport
])
def test_transport_init_failed(tmpdir, _transport):
    with pytest.raises(ConnectionError):
        _transport(str(tmpdir.join("unexisting")))