Loading tests/test_black.py +3 −2 Changes for tests/test_black.py: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -99,8 +99,8 @@ def isolation(self, *args: Any, **kwargs: Any) -> Generator[BinaryIO, None, None sys.stderr = TextIOWrapper(self.stderrbuf, encoding=self.charset) yield output finally: self.stdout_bytes = sys.stdout.buffer.getvalue() self.stderr_bytes = sys.stderr.buffer.getvalue() self.stdout_bytes = sys.stdout.buffer.getvalue() # type: ignore self.stderr_bytes = sys.stderr.buffer.getvalue() # type: ignore sys.stderr = hold_stderr Loading Loading @@ -1226,6 +1226,7 @@ def test_preserves_line_endings_via_stdin(self) -> None: result = runner.invoke( black.main, ["-", "--fast"], input=BytesIO(contents.encode("utf8")) ) self.assertEqual(result.exit_code, 0) output = runner.stdout_bytes self.assertIn(nl.encode("utf8"), output) if nl == "\n": Loading Loading
tests/test_black.py +3 −2 Changes for tests/test_black.py: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -99,8 +99,8 @@ def isolation(self, *args: Any, **kwargs: Any) -> Generator[BinaryIO, None, None sys.stderr = TextIOWrapper(self.stderrbuf, encoding=self.charset) yield output finally: self.stdout_bytes = sys.stdout.buffer.getvalue() self.stderr_bytes = sys.stderr.buffer.getvalue() self.stdout_bytes = sys.stdout.buffer.getvalue() # type: ignore self.stderr_bytes = sys.stderr.buffer.getvalue() # type: ignore sys.stderr = hold_stderr Loading Loading @@ -1226,6 +1226,7 @@ def test_preserves_line_endings_via_stdin(self) -> None: result = runner.invoke( black.main, ["-", "--fast"], input=BytesIO(contents.encode("utf8")) ) self.assertEqual(result.exit_code, 0) output = runner.stdout_bytes self.assertIn(nl.encode("utf8"), output) if nl == "\n": Loading