# pylint: disable = missing-docstring, missing-return-doc, missing-return-type-doc
# pylint: disable = invalid-name
# pylint: disable = no-self-use
# pylint: disable = protected-access

import pytest
from ft_conn.ft_sock import FTSock
from ft_conn.ft_error import BrokenSocketError
from .ft_mock import MockSock

class TestFTSock:
    def test_recv_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True

        with pytest.raises(BrokenSocketError):
            s.recv_bytes(1)

    def test_send_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True

        with pytest.raises(BrokenSocketError):
            s.send_bytes(b'l')

    def test_timeout_set(self):
        s = FTSock(MockSock(True))
        s.timeout_set(10)
        assert s.sock.gettimeout() == 10

26430a1fd1c17b54302c7c22525e5583c103334c
<mask token>


class TestFTSock:
    <mask token>
    <mask token>
    <mask token>

<mask token>


class TestFTSock:

    def test_recv_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True
        with pytest.raises(BrokenSocketError):
            s.recv_bytes(1)
    <mask token>

    def test_timeout_set(self):
        s = FTSock(MockSock(True))
        s.timeout_set(10)
        assert s.sock.gettimeout() == 10

<mask token>


class TestFTSock:

    def test_recv_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True
        with pytest.raises(BrokenSocketError):
            s.recv_bytes(1)

    def test_send_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True
        with pytest.raises(BrokenSocketError):
            s.send_bytes(b'l')

    def test_timeout_set(self):
        s = FTSock(MockSock(True))
        s.timeout_set(10)
        assert s.sock.gettimeout() == 10

import pytest
from ft_conn.ft_sock import FTSock
from ft_conn.ft_error import BrokenSocketError
from .ft_mock import MockSock


class TestFTSock:

    def test_recv_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True
        with pytest.raises(BrokenSocketError):
            s.recv_bytes(1)

    def test_send_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True
        with pytest.raises(BrokenSocketError):
            s.send_bytes(b'l')

    def test_timeout_set(self):
        s = FTSock(MockSock(True))
        s.timeout_set(10)
        assert s.sock.gettimeout() == 10

# pylint: disable = missing-docstring, missing-return-doc, missing-return-type-doc
# pylint: disable = invalid-name
# pylint: disable = no-self-use
# pylint: disable = protected-access

import pytest
from ft_conn.ft_sock import FTSock
from ft_conn.ft_error import BrokenSocketError
from .ft_mock import MockSock

class TestFTSock:
    def test_recv_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True

        with pytest.raises(BrokenSocketError):
            s.recv_bytes(1)

    def test_send_b(self):
        s = FTSock(MockSock(True))
        s.sock.pshutdown = True

        with pytest.raises(BrokenSocketError):
            s.send_bytes(b'l')

    def test_timeout_set(self):
        s = FTSock(MockSock(True))
        s.timeout_set(10)
        assert s.sock.gettimeout() == 10
