]> 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:

[#154] Handle comments between decorators properly (#166)
[etc/vim.git] / tests / test_black.py
index dd3beed99abe0e5b6d7b3f37188fa41420f38493..9c029df7eb7b13a891070c30879f4778e4cca121 100644 (file)
@@ -626,6 +626,14 @@ class BlackTestCase(unittest.TestCase):
             )
             self.assertEqual(result.exit_code, 1)
 
+    @patch("black.dump_to_file", dump_to_stderr)
+    def test_comment_in_decorator(self) -> None:
+        source, expected = read_data("comments6")
+        actual = fs(source)
+        self.assertFormatEqual(expected, actual)
+        black.assert_equivalent(source, actual)
+        black.assert_stable(source, actual, line_length=ll)
+
 
 if __name__ == "__main__":
     unittest.main()