def assert_check(check, source_string, target_string, should_skip, **kwargs):
 try:
  assert (should_skip == check(source_string, target_string, **kwargs))
 except FilterFailure:
  assert (not should_skip)

def assert_check ( check , source_string , target_string , should_skip , ** kwargs ) : try : assert ( should_skip == check ( source_string , target_string , ** kwargs ) ) except FilterFailure : assert ( not should_skip )
runs check and asserts whether it should be skipped or not for the given source_string and target_string .