def __init__(self, series): """ Initiates the test class to test the uniqueness of a column :param series: the column to test :type series: pandas series """ self.td = "Unique Values" col_setUp.__init__(self, series) test_fail.__init__(self, tm="Not Unique") self._test()
def __init__(self, series): """ Initiates the test class for test all true :param series: the column to test :type series: pandas series """ self.td = "All true" col_setUp.__init__(self, series) test_fail.__init__(self, tm="Not all True") self._test()
def __init__(self, series): """ Tests to see if there are any null values :param series: the column to test :type series: pandas series """ self.td = "Null Values" col_setUp.__init__(self, series) test_fail.__init__(self, tm="Contains null values") self._test()
def __init__(self, series, lower, upper): """ :param series: the column to test :type series: pandas series :param lower: numeric lower bound :type lower: float :param upper: numeric upper bound :type upper: float """ col_setUp.__init__(self, series) lower_bound.__init__(self, lower) upper_bound.__init__(self, upper) test_fail.__init__(self, tm="Values outside of range")
def __init__(self, series, lower): """ Initiates the test class for the greater than value class. Tests that X > lower is True :param series: the column to test :type series: pandas series :param lower: numeric lower bound :type lower: float or int """ self.td = "Greater than value (>)" col_setUp.__init__(self, series) lower_bound.__init__(self, lower) test_fail.__init__(self, tm="Values outside of lower bound") self._test()
def __init__(self, series, upper): """ Initiates the test class for the less than value class. Tests that X < upper is True :param series: the column to test :type series: pandas series :param upper: numeric upper bound :type upper: float or int """ self.td = "Less than value (<=)" col_setUp.__init__(self, series) upper_bound.__init__(self, upper) test_fail.__init__(self, tm="Values outside of upper bound") self._test()
def __init__(self, series, expc_type): """ Initiates test type class. Classes tests if the column meets the expected type condition. :param series: the column to test :type series: pandas series :param expc_type: the expected type of the column :type expc_type: string """ col_setUp.__init__(self, series) self.td = "Test column type" self.expc_type = self.get_type(expc_type) test_fail.__init__(self, tm=self._test_message()) self._test()
def __init__(self, series, expc_values): """ Initiates the test class to test the values of a column :param series: the column to test :type series: pandas series :param expc_values: the expected values :type expc_values: list """ self.td = "Expected Values" self.expc_values = expc_values col_setUp.__init__(self, series) self.add_values = set(self.uni_values) - set(self.expc_values) test_fail.__init__(self, tm=self._test_message()) self._test()