Пример #1
0
 def test_install_mypy_prerequisites_with_wrong_script(self):
     with self.popen_swap_failure:
         with self.swap(
             run_mypy_checks, 'MYPY_REQUIREMENTS_FILE_PATH', 'scripts.wrong'
         ):
             code, _ = run_mypy_checks.install_mypy_prerequisites(False)
             self.assertEqual(code, 1)
Пример #2
0
 def test_install_mypy_prerequisites_with_user_prefix_error(self):
     with self.popen_swap_user_prefix_error:
         code, path = run_mypy_checks.install_mypy_prerequisites(False)
         self.assertEqual(code, 0)
         self.assertNotEqual(path, self.mypy_cmd_path)
Пример #3
0
 def test_install_mypy_prerequisites_for_ci(self):
     with self.popen_swap_success:
         code, _ = run_mypy_checks.install_mypy_prerequisites(True)
         self.assertEqual(code, 0)
Пример #4
0
 def test_install_mypy_prerequisites(self):
     with self.popen_swap_success:
         code, path = run_mypy_checks.install_mypy_prerequisites(False)
         self.assertEqual(code, 0)
         self.assertEqual(path, self.mypy_cmd_path)