Tests: enh: use assertEqual(x2, x1) instead of bare assert_(x1 == x2).

This brings a more meaningful info on such a failed assert.

Used (within test directory):

sed -ri 's#assert_\(\s*([^ ]+)\s*==\s*([^ ]+)\s*\)#assertEqual(\2, \1)#' *py
Tests: enh: user assertIn(x1, x2) instead of assert_(x1 in x2).

This brings a more meaningful info on such a failed assert.

Used (within test directory):

sed -ri 's#assert_\(\s*([^ ]+)\s+in\s+([^ ]+)\s*\)#assertIn(\1, \2)#' *py
Tests: enh: use assertIsNot(x1, x2) instead of assert_(x1 is not x2).

This brings a more meaningful info on such a failed assert.

Used (within test directory):

sed -ri 's#assert_\(\s*([^ ]+)\s+is not\s+([^ ]+)\s*\)#assertIsNot(\1, \2)#' *py
Tests: enh: use assertIs(x1, x2) instead of assert_(x1 is x2).

This brings a more meaningful info on such a failed assert.

Used (within test directory):

sed -ri 's#assert_\(\s*([^ ]+)\s+is\s+([^ ]+)\s*\)#assertIs(\2, \1) *.py
better regex for 'x1 == x2' (allow spaces in x2 (for tuples, lists)):

sed -ri 's#assert_\(\s*([^ ]+)\s*==\s*(.+?)\s*\)#assertEqual(\2, \1)#' *py
better regex for 'x1 == x2' (allow spaces in x1 (for tuples, lists)):

sed -ri 's#assert_\(\s*(.+?)\s*==\s*(.+?)\s*\)#assertEqual(\2, \1)#' *py
Corrected bad sed replace.

due to bad regex.
Try unittest2 ..
corrected by replaced assert_.

due bad regex.
fixed badly transformed assert_.
Better log_match function. + better name.
log_match: clean 2:

replaced "assert_(assert_log_match(..))" by "assert_log_match(..)"
         "      True("
better any_log_match.
"not any_log_match" -> "no_log_match".
simplification 1.
simplification 2.
better name.
tests: bunch of manual corrections.
sed -ri 's#assert_\((.*) != None\)#assertIsNot(None, \1)#' *py
Fix: badly transformed.

was:

if index > self.count_logs():
    return False