Lines Matching refs:second
818 logging.getLogger('foo.bar').error('second message')
820 'ERROR:foo.bar:second message'])
835 def _getAssertEqualityFunc(self, first, second):
838 Returns: A callable accepting (first, second, msg=None) that will
839 raise a failure exception if first != second with a useful human
843 # NOTE(gregory.p.smith): I considered isinstance(first, type(second))
852 if type(first) is type(second):
861 def _baseAssertEqual(self, first, second, msg=None):
863 if not first == second:
864 standardMsg = '%s != %s' % _common_shorten_repr(first, second)
868 def assertEqual(self, first, second, msg=None):
872 assertion_func = self._getAssertEqualityFunc(first, second)
873 assertion_func(first, second, msg=msg)
875 def assertNotEqual(self, first, second, msg=None):
879 if not first != second:
881 safe_repr(second)))
884 def assertAlmostEqual(self, first, second, places=None, msg=None,
898 if first == second:
904 diff = abs(first - second)
911 safe_repr(second),
923 safe_repr(second),
929 def assertNotAlmostEqual(self, first, second, places=None, msg=None,
943 diff = abs(first - second)
945 if not (first == second) and diff > delta:
949 safe_repr(second),
955 if not (first == second) and round(diff, places) != 0:
958 safe_repr(second),
972 seq2: The second sequence to compare.
1022 differing += ('\nUnable to index element %d of second %s\n' %
1053 'of second %s\n' % (len1, seq_type_name))
1074 list2: The second list to compare.
1086 tuple2: The second tuple to compare.
1097 set2: The second set to compare.
1117 self.fail('second argument does not support set difference: %s' % e)
1124 lines.append('Items in the first set but not the second:')
1128 lines.append('Items in the second set but not the first:')
1203 def assertCountEqual(self, first, second, msg=None):
1208 Counter(list(second)))
1215 first_seq, second_seq = list(first), list(second)
1218 second = collections.Counter(second_seq)
1223 if first == second:
1235 def assertMultiLineEqual(self, first, second, msg=None):
1238 self.assertIsInstance(second, str, 'Second argument is not a string')
1240 if first != second:
1243 len(second) > self._diffThreshold):
1244 self._baseAssertEqual(first, second, msg)
1246 secondlines = second.splitlines(keepends=True)
1249 secondlines = [second + '\n']
1250 standardMsg = '%s != %s' % _common_shorten_repr(first, second)