Skip to content

Roundtrip tests with missing values #15

@jorisvandenbossche

Description

@jorisvandenbossche

Currently the roundtrip tests (

def test_from_dataframe_roundtrip(
) only use a simple data generation logic, which doesn't include any missing values, as far as I see:

def mock_columns(
nominal_dtype: NominalDtype, size: int
) -> st.SearchStrategy[MockColumn]:
dtype = nominal_dtype.value
elements = None
if nominal_dtype == NominalDtype.CATEGORY:
dtype = np.int8
elements = st.integers(0, 15)
elif nominal_dtype == NominalDtype.UTF8:
# nps.arrays(dtype="U8") doesn't skip surrogates by default
elements = utf8_strings()
x_strat = nps.arrays(dtype=dtype, shape=size, elements=elements)
return x_strat.map(lambda x: MockColumn(x, nominal_dtype))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions