示例#1
0
 def test_process_queue(self, mock_stdout: Mock) -> None:
     loop = asyncio.get_event_loop()
     config_path = Path(lib.__file__).parent / "primer.json"
     with patch("black_primer.lib.git_checkout_or_rebase", return_false):
         with TemporaryDirectory() as td:
             return_val = loop.run_until_complete(
                 lib.process_queue(str(config_path), td, 2))
             self.assertEqual(0, return_val)
示例#2
0
 def test_process_queue(self, mock_stdout: Mock) -> None:
     """Test the process queue on primer itself
     - If you have non black conforming formatting in primer itself this can fail"""
     loop = asyncio.get_event_loop()
     config_path = Path(lib.__file__).parent / "primer.json"
     with patch("black_primer.lib.git_checkout_or_rebase", return_false):
         with TemporaryDirectory() as td:
             return_val = loop.run_until_complete(
                 lib.process_queue(str(config_path), Path(td), 2,
                                   ["django", "pyramid"]))
             self.assertEqual(0, return_val)