summaryrefslogtreecommitdiff
path: root/tests/mixins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-31 08:23:51 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-31 08:34:59 -0500
commit77cdb9f15cd161e25da6f47ceaa8deb516c353af (patch)
treed60ab04f46899d84655950b37070883c17506473 /tests/mixins.py
parent7366feb46f25d07c60d1fcaa941f8d0613dbd764 (diff)
downloadpython-coveragepy-git-77cdb9f15cd161e25da6f47ceaa8deb516c353af.tar.gz
mypy: add data.py and test_api.py
Diffstat (limited to 'tests/mixins.py')
-rw-r--r--tests/mixins.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/mixins.py b/tests/mixins.py
index 9be6d21c..7f246299 100644
--- a/tests/mixins.py
+++ b/tests/mixins.py
@@ -12,6 +12,8 @@ import os
import os.path
import sys
+from typing import Tuple
+
import pytest
from coverage.misc import SysModuleSaver
@@ -122,14 +124,14 @@ class StdStreamCapturingMixin:
"""Grab the fixture so our methods can use it."""
self.capsys = capsys
- def stdouterr(self):
+ def stdouterr(self) -> Tuple[str, str]:
"""Returns (out, err), two strings for stdout and stderr."""
return self.capsys.readouterr()
- def stdout(self):
+ def stdout(self) -> str:
"""Returns a string, the captured stdout."""
return self.capsys.readouterr().out
- def stderr(self):
+ def stderr(self) -> str:
"""Returns a string, the captured stderr."""
return self.capsys.readouterr().err