def compare_against_time(self, testing, directive, tuple_position,
                             error_msg):
        """Helper method that tests testing against directive based on the
        tuple_position of time_tuple.  Uses error_msg as error message.

        """
        strftime_output = time.strftime(directive, self.time_tuple).lower()
        comparison = testing[self.time_tuple[tuple_position]]
        self.failUnless(strftime_output in testing, "%s: not found in tuple" %
                                                    error_msg)
        self.failUnless(comparison == strftime_output,
                        "%s: position within tuple incorrect; %s != %s" %
                        (error_msg, comparison, strftime_output))
dataset/ETHPy150Open babble/babble/include/jython/Lib/test/test_strptime.py/LocaleTime_Tests.compare_against_time/original