Skip to main content



Asserts that a condition is true. This assertion can be used with Layer dataset and model entities.

  • Parameters

    assert_function (Callable[[...], bool**]) -- Test function with a boolean return type.

  • Returns

    Function object.

  • Return type

    Callable[[...], Any]

from layer.decorators.assertions import assert_true
from layer.decorators import dataset

def test_function(data_frame):
return len(data_frame.index) == 0

def create_my_dataset():
return pandas.DataFrame()