Пример #1
0
 def test_async_main(self) -> None:
     loop = asyncio.get_event_loop()
     work_dir = Path(gettempdir()) / f"primer_ut_{getpid()}"
     args = {
         "config": "/config",
         "debug": False,
         "keep": False,
         "long_checkouts": False,
         "rebase": False,
         "workdir": str(work_dir),
         "workers": 69,
     }
     with patch("black_primer.cli.lib.process_queue", return_zero):
         return_val = loop.run_until_complete(cli.async_main(**args))
         self.assertEqual(0, return_val)
Пример #2
0
 def test_async_main(self) -> None:
     loop = asyncio.get_event_loop()
     work_dir = Path(gettempdir()) / f'primer_ut_{getpid()}'
     args = {
         'config': '/config',
         'debug': False,
         'keep': False,
         'long_checkouts': False,
         'rebase': False,
         'workdir': str(work_dir),
         'workers': 69,
     }
     with patch('black_primer.cli.lib.process_queue', return_zero):
         return_val = loop.run_until_complete(cli.async_main(**args))
         self.assertEqual(0, return_val)