Example #1
0
 def test_variable_shape_must_have_variable_shape_schema_type(
         self, schema_type):
     with pytest.raises(ValueError):
         BytesVariableShape(dtype=bytes,
                            column_layout='flat',
                            schema_type=schema_type)
Example #2
0
def valid_schema(column_layout, backend, backend_options):
    schema = BytesVariableShape(dtype=bytes,
                                column_layout=column_layout,
                                backend=backend,
                                backend_options=backend_options)
    return schema
Example #3
0
 def test_backend_must_be_specified_if_backend_options_provided(self):
     with pytest.raises(ValueError):
         BytesVariableShape(dtype=bytes,
                            column_layout='flat',
                            backend_options={})
Example #4
0
 def test_backend_options_must_be_dict_or_nonetype(self, opts):
     with pytest.raises(TypeError):
         BytesVariableShape(dtype=bytes,
                            column_layout='flat',
                            backend='31',
                            backend_options=opts)
Example #5
0
 def test_variable_shape_backend_code_valid_value(self, backend):
     with pytest.raises(ValueError):
         BytesVariableShape(dtype=bytes,
                            column_layout='flat',
                            backend=backend)
Example #6
0
 def test_column_layout_must_be_valid_value(self, collayout):
     with pytest.raises(ValueError):
         BytesVariableShape(dtype=bytes, column_layout=collayout)
Example #7
0
 def test_column_type_must_be_str(self, coltype):
     with pytest.raises(ValueError):
         BytesVariableShape(dtype=bytes,
                            column_layout='flat',
                            column_type=coltype)