pytest-dev / pytest

@@ -998,7 +998,15 @@
Loading
998 998
                    # u'😄' will result in a High Surrogate (U+D83D) character, which is
999 999
                    # rendered as u'�'; in this case we just strip that character out as it
1000 1000
                    # serves no purpose being rendered
1001 -
                    msg = msg.rstrip(u"\uD83D")
1001 +
                    try:
1002 +
                        surrogate = six.unichr(0xD83D)
1003 +
                        msg = msg.rstrip(surrogate)
1004 +
                    except ValueError:  # pragma: no cover
1005 +
                        # Jython cannot represent this lone surrogate at all (#5256):
1006 +
                        # ValueError: unichr() arg is a lone surrogate in range
1007 +
                        #     (0xD800, 0xDFFF) (Jython UTF-16 encoding)
1008 +
                        # ignore this case as it shouldn't appear in the string anyway
1009 +
                        pass
1002 1010
                msg += ellipsis
1003 1011
            line += sep + msg
1004 1012
    return line

@@ -447,6 +447,10 @@
Loading
447 447
        """Ensure that file.name is a string."""
448 448
        return repr(self.buffer)
449 449
450 +
    @property
451 +
    def mode(self):
452 +
        return self.buffer.mode.replace("b", "")
453 +
450 454
    def __getattr__(self, name):
451 455
        return getattr(object.__getattribute__(self, "buffer"), name)
452 456

@@ -1051,6 +1051,9 @@
Loading
1051 1051
            cap.done()
1052 1052
            pytest.raises(AttributeError, cap.suspend)
1053 1053
1054 +
    def test_capfd_sys_stdout_mode(self, capfd):
1055 +
        assert "b" not in sys.stdout.mode
1056 +
1054 1057
1055 1058
@contextlib.contextmanager
1056 1059
def saved_fd(fd):
Files Coverage
src 93.10%
testing 89.99%
Project Totals (115 files) 91.33%
linting,docs,doctesting-linux
Build #9237.3 -
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
py27-pexpect,py27-twisted-linux
Build #9237.1 -
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
py35-xdist
Build #None -
py27-pluggymaster-xdist
Build #None -
py27-lsof-nobyte-numpy
Build #None -
py34-xdist
Build #None -
py27-xdist-osx
Build #9237.4 -
TRAVIS_OS_NAME=osx
py37
Build #None -
py37-lsof-numpy-xdist-linux
Build #9237.12 -
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
py37-pexpect,py37-twisted-linux
Build #9237.15 -
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading