Exemple #1
0
 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'])
Exemple #2
0
 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']))
Exemple #3
0
 def test_run_one_arg(self):
     app = hsc.CloneSubCommand()
     self.assertErrorRegex(SystemExit, '1', app.run, ['clone', 'some-dist'])
Exemple #4
0
 def test_run_no_args(self):
     app = hsc.CloneSubCommand()
     self.assertErrorRegex(SystemExit, '1', app.run, ['clone'])