Skip to content

Commit 4649657

Browse files
authored
Report if uninstall of package in pep561 tests failed (#4884)
1 parent 92fad7a commit 4649657

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mypy/test/testpep561.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def install_package(self, pkg: str,
4848
try:
4949
yield
5050
finally:
51-
run_command([python_executable, '-m', 'pip', 'uninstall', '-y', pkg], cwd=package_path)
51+
returncode, lines = run_command([python_executable, '-m', 'pip', 'uninstall',
52+
'-y', pkg], cwd=package_path)
53+
if returncode != 0:
54+
self.fail('\n'.join(lines))
5255

5356
def test_get_pkg_dirs(self) -> None:
5457
"""Check that get_package_dirs works."""

0 commit comments

Comments
 (0)