'Test various methods with a closed device.
Args:
method: The name of the method to call.
args: The arguments to pass.'

@pytest.mark.parametrize('method,    args', [('seek', [0]), ('flush', []), ('isatty', []), ('readline', []), ('tell', []), ('write', ['']), ('read', [])])
def test_closed_device(self, pyqiodev, method, args):

    func = getattr(pyqiodev, method)
    with pytest.raises(ValueError, match='IO    operation    on    closed    device!'):
        func(*args)
