]> git.madduck.net Git - etc/vim.git/blobdiff - tests/test_black.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add trove classifier for Python 3.7 support (#486)
[etc/vim.git] / tests / test_black.py
index 421e8712da130d9f592180c7afcd4b2a6ebab833..85ab2b6ba3e2375c09295eb3d65d9a0fe29fffac 100644 (file)
@@ -99,8 +99,8 @@ class BlackRunner(CliRunner):
                 sys.stderr = TextIOWrapper(self.stderrbuf, encoding=self.charset)
                 yield output
             finally:
                 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
 
 
                 sys.stderr = hold_stderr
 
 
@@ -1226,6 +1226,7 @@ class BlackTestCase(unittest.TestCase):
             result = runner.invoke(
                 black.main, ["-", "--fast"], input=BytesIO(contents.encode("utf8"))
             )
             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":
             output = runner.stdout_bytes
             self.assertIn(nl.encode("utf8"), output)
             if nl == "\n":