Skip to content

Commit

Permalink
Merge 6c2739d into 6f95189
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Mar 21, 2018
2 parents 6f95189 + 6c2739d commit b5b27c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions _pytest/terminal.py
Expand Up @@ -12,6 +12,7 @@
import pluggy
import py
import six
from more_itertools import collapse

import pytest
from _pytest import nodes
Expand Down Expand Up @@ -442,7 +443,7 @@ def pytest_sessionstart(self, session):

def _write_report_lines_from_hooks(self, lines):
lines.reverse()
for line in flatten(lines):
for line in collapse(lines):
self.write_line(line)

def pytest_report_header(self, config):
Expand Down Expand Up @@ -700,15 +701,6 @@ def repr_pythonversion(v=None):
return str(v)


def flatten(values):
for x in values:
if isinstance(x, (list, tuple)):
for y in flatten(x):
yield y
else:
yield x


def build_summary_stats_line(stats):
keys = ("failed passed skipped deselected "
"xfailed xpassed warnings error").split()
Expand Down
1 change: 1 addition & 0 deletions changelog/3330.trivial.rst
@@ -0,0 +1 @@
Remove internal ``_pytest.terminal.flatten`` function in favor of ``more_itertools.collapse``.

0 comments on commit b5b27c1

Please sign in to comment.