diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-08-01 11:44:21 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-08-01 11:44:21 -0400 |
commit | f5cb34e7f96e69043f5f2924b5207cb22123be4f (patch) | |
tree | d3a5bf9a632eb9c9e49f96208a19ae3270492d68 /test/coveragetest.py | |
parent | 344a11e708bdc8eeb072a51d7f31f7cad58c5b17 (diff) | |
download | python-coveragepy-git-f5cb34e7f96e69043f5f2924b5207cb22123be4f.tar.gz |
Python 3.2 doctest expects stdout to have an encoding.
Diffstat (limited to 'test/coveragetest.py')
-rw-r--r-- | test/coveragetest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/coveragetest.py b/test/coveragetest.py index 52fde87a..bdee9185 100644 --- a/test/coveragetest.py +++ b/test/coveragetest.py @@ -12,11 +12,13 @@ class Tee(object): def __init__(self, *files): """Make a Tee that writes to all the files in `files.`""" - self.files = files + self._files = files + if hasattr(files[0], "encoding"): + self.encoding = files[0].encoding def write(self, data): """Write `data` to all the files.""" - for f in self.files: + for f in self._files: f.write(data) |