def pytest_collection_modifyitems(self, session, config, items):
    if self.active:
        new_items = OrderedDict()
        other_items = OrderedDict()
        for item in items:
            if (item.nodeid not in self.cached_nodeids):
                new_items[item.nodeid] = item
            else:
                other_items[item.nodeid] = item
        items[:] = (self._get_increasing_order(six.itervalues(new_items)) + self._get_increasing_order(six.itervalues(other_items)))
    self.cached_nodeids = [x.nodeid for x in items if isinstance(x, pytest.Item)]
def pytest_collection_modifyitems(self, session, config, items):
    if self.active:
        new_items = OrderedDict()
        other_items = OrderedDict()
        for item in items:
            if (item.nodeid not in self.cached_nodeids):
                new_items[item.nodeid] = item
            else:
                other_items[item.nodeid] = item
        items[:] = (self._get_increasing_order(six.itervalues(new_items)) + self._get_increasing_order(six.itervalues(other_items)))
    self.cached_nodeids = [x.nodeid for x in items if isinstance(x, pytest.Item)]