def test_run_two_args_dist_not_found(self): app = hsc.CloneSubCommand() found = {'some-output': False, 'some-dist': False} with patch('os.path.exists', side_effect=mock_exists(found)): with patch('shutil.copytree'): self.assertErrorRegex(SystemExit, '1', app.run, ['clone', 'some-dist', 'some-output'])
def test_run_two_args_good(self): app = hsc.CloneSubCommand() found = {'some-output': False, 'some-dist': True} with patch('os.path.exists', side_effect=mock_exists(found)): with patch('shutil.copytree'): self.assertEqual( 0, app.run(['clone', 'some-dist', 'some-output']))
def test_run_one_arg(self): app = hsc.CloneSubCommand() self.assertErrorRegex(SystemExit, '1', app.run, ['clone', 'some-dist'])
def test_run_no_args(self): app = hsc.CloneSubCommand() self.assertErrorRegex(SystemExit, '1', app.run, ['clone'])