]> git.madduck.net Git - etc/vim.git/commitdiff

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:

Fix mono test
authorZsolt Dollenstein <zsol.zsol@gmail.com>
Fri, 8 May 2020 15:13:42 +0000 (16:13 +0100)
committerZsolt Dollenstein <zsol.zsol@gmail.com>
Fri, 8 May 2020 15:15:31 +0000 (16:15 +0100)
tests/test_black.py

index baa44ab32c9ce33de82a442e97a5d7f33dee27e6..40f4add54b9a4ee97bf240080e7bf14b12175a02 100644 (file)
@@ -1363,16 +1363,15 @@ class BlackTestCase(unittest.TestCase):
             mock.side_effect = OSError
             black.write_cache({}, [], mode)
 
-    @patch("black.ProcessPoolExecutor", autospec=True)
-    def test_works_in_mono_process_only_environment(self, executor: MagicMock) -> None:
-        self.skipTest("this test fails when run with the rest of the suite")
-        executor.side_effect = OSError()
+    @event_loop(close=False)
+    @patch("black.ProcessPoolExecutor", MagicMock(side_effect=OSError))
+    def test_works_in_mono_process_only_environment(self) -> None:
         with cache_dir() as workspace:
             for f in [
                 (workspace / "one.py").resolve(),
                 (workspace / "two.py").resolve(),
             ]:
-                f.write_text("print('hello')")
+                f.write_text('print("hello")\n')
             self.invokeBlack([str(workspace)])
 
     @event_loop(close=False)