## testing.source()


An in-memory source ([sverify.io.StaticSource](io.StaticSource.md#sverify.io.StaticSource)) holding [rows](engines.Connection.md#sverify.engines.Connection.rows).


Usage

``` python
testing.source(
    rows,
    schema=None,
    *,
    name=None,
    version=0,
)
```


The `sv_source` fixture of sverify's pytest plugin is this function.


## Parameters


`rows: Rows`  
The rows: an Arrow table, dicts by column name, or tuples in the schema's column order.

`schema: Any = None`  
The columns, as anything `ibis.schema` accepts (such as `{"id": "!int64", "amount": "int64"}`, where `!` is NOT NULL), an Ibis schema or an Arrow schema. Optional for an Arrow table.

`name: str | None = None`  
The table's name in the plans that read it. Required (before 1.0 it defaulted to `"table"`, which warns for one release).

`version: int = ``0`  
The source's version. Default: 0.


## Returns


`StaticSource`  
A [StaticSource](io.StaticSource.md#sverify.io.StaticSource).


## Raises


`TypeError`  
No schema is given for rows that are not an Arrow table.
