def test_error(self, value, t, error): """Test casting values to the specified type unsuccessfully.""" with pytest.raises(error): manifest.cast_value(value, t)
def test_ok(self, value, t, expected): """Test casting values to the specified type successfully.""" actual = manifest.cast_value(value, t) assert type(actual) == type(expected) assert actual == expected