diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index ba0f48ed39d..fa86059aebd 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -207,6 +207,8 @@ def write_captured_output(self, report): else: content = content_err + # XXX: flaky in test suite, trying to figure out why. + assert content, repr([content, content_log, content_err]) if content: tag = getattr(Junit, "system-err") self.append(tag(bin_xml_escape(content)))