Compare expected list vs actual list data.
483223
def _validate_list_data(self, expected, actual):
        """"""
        for e in expected:
            if e not in actual:
                return "expected item {} not found in actual list".format(e)
        return None
408901
def column_lists_equal(a: List[Column], b: List[Column]) -> bool:
    
    n = len(a)
    if len(b) != n:
        return False
    for i in range(n):
        if not columns_equal(a[i], b[i]):
            log.debug("Mismatch: {!r} != {!r}", a[i], b[i])
            return False
    return True
1135312
def FilterList(l, offset, count=0, filter_value=None):
  """"""

  if offset < 0:
    raise ValueError("Offset needs to be greater than or equal to zero")

  if count < 0:
    raise ValueError("Count needs to be greater than or equal to zero")

  count = count or sys.maxsize
  if not filter_value:
    return l[offset:offset + count]

  index = 0
  items = []
  for item in l:
    serialized_item = item.SerializeToString()
    if re.search(re.escape(filter_value), serialized_item, re.I):
      if index >= offset:
        items.append(item)
      index += 1

      if len(items) >= count:
        break

  return items
761503
def validate_flavor_data(self, expected, actual):
        
        self.log.debug('Validating flavor data...')
        self.log.debug('actual: {}'.format(repr(actual)))
        act = [a.name for a in actual]
        return self._validate_list_data(expected, act)
1165185
def visit_ListComp(self, node: ast.ListComp) -> None:
        """"""
        if node in self._recomputed_values:
            value = self._recomputed_values[node]
            text = self._atok.get_text(node)

            self.reprs[text] = value

        self.generic_visit(node=node)
43484
public static <T> boolean compareLists(List<T> list1, List<T> list2) {
        if (list1 == list2)
            return true;
        if (list1 == null || list2 == null)
            return false;
        if (list1.size() != list2.size())
            return false;

        for (int i = 0; i < list1.size(); i++) {
            if (!list1.get(i).equals(list2.get(i))) {
                return false;
            }
        }
        return true;
    }
1028423
public static void assertEquals(Object expected, Object actual) {
        assertEquals(expected, actual, "Expected value " + expected + " but got " + actual);
    }
95358
function (list, value, missingIsFalse) {
				if (list === "*") return true;
				return list.length > 0 ? list.indexOf(value) != -1 : !missingIsFalse;
			}
313569
public static boolean arrayEquals(List<String> a, List<String> b) {
        if (a == null) {
            a = new ArrayList<>();
        }
        if (b == null) {
            b = new ArrayList<>();
        }
        if (a.size() != b.size()) {
            return false;
        }

        for (int i = 0; i < a.size(); i ++) {
            if (!a.get(i).equals(b.get(i))) {
                return false;
            }
        }
        return true;
    }
812020
def evaluate(actual, expected)
      same = (Set.new(expected) == Set.new(actual))
      same ? pass(new_message.has_same_elements_as(expected)) : fail(expected_message.elements(expected).to_match(actual))
    end
1272622
function (list) {
            if (list.size() !== this.size()) {
                return false;
            }
            var isEqual = true,
                a, b;
            for (var i = 0; i < this.$items.length; i++) {
                a = this.$items[i];
                b = list.at(i);
                if (a instanceof Bindable && b instanceof Bindable) {
                    if (!a.isDeepEqual(b)) {
                        return false;
                    }
                } else if (a instanceof Bindable || b instanceof Bindable) {
                    return false;
                } else {
                    isEqual = _.isEqual(a, b);
                }
            }

            return isEqual;
        }
874483
function listReady(list, error) {
        if (typeof error != 'undefined') {
          callback(error);
          return;
        }
        self.shouldBeTrue(list instanceof List, 'is list');
        self.shouldBeTrue(list.length() == 2, 'is 2');
        list.moveFirst();
        self.shouldBeTrue(list.get('name') == 'Larry', 'larry');
        list.moveNext();
        self.shouldBeTrue(list.get('name') == 'Moe', 'moe');
        createSets();
      }
1322849
def get_list_representation(self):
        """"""
        if self.is_list:
            return self.list_or_slice
        else:
            return self[list(range(self.num_examples))]
107141
def intinlist(lst):
    """"""
    for item in lst:
        try:
            item = int(item)
            return True
        except ValueError:
            pass
    return False
1357960
def difference(a: Iterable[Any], b: Container[Any]) -> List[Any]:
    
    d = []
    for item in a:
        if item not in b:
            d.append(item)
    return d
1372399
def is_list(self, key):
        """"""
        data = self.model.get_data()
        return isinstance(data[key], (tuple, list))
687488
def _comparator_eq(filter_value, tested_value):
    
    if isinstance(tested_value, ITERABLES):
        # Convert the list items to strings
        for value in tested_value:
            # Try with the string conversion
            if not is_string(value):
                value = repr(value)

            if filter_value == value:
                # Match !
                return True
    # Standard comparison
    elif not is_string(tested_value):
        # String vs string representation
        return filter_value == repr(tested_value)
    else:
        # String vs string
        return filter_value == tested_value

    return False