diff --git a/deploy_tool/installer.py b/deploy_tool/installer.py index 3f1b50e..bb15e59 100644 --- a/deploy_tool/installer.py +++ b/deploy_tool/installer.py @@ -1,5 +1,6 @@ from __future__ import annotations +import ctypes import re import hashlib import os diff --git a/tests/test_installer.py b/tests/test_installer.py index 4f75b82..03d3e78 100644 --- a/tests/test_installer.py +++ b/tests/test_installer.py @@ -3,10 +3,12 @@ import io import tempfile import unittest import zipfile +import ctypes from pathlib import Path from subprocess import CompletedProcess from unittest.mock import patch +import deploy_tool.installer as installer_module from deploy_tool.installer import ( MAVEN_ARCHIVE_NAME, MYSQL_VERSION, @@ -148,6 +150,9 @@ class InstallerTests(unittest.TestCase): self.assertTrue(any("校验通过" in message for message in messages)) configure.assert_called_once() + def test_windows_elevation_dependency_is_imported(self): + self.assertIs(installer_module.ctypes, ctypes) + def test_persists_six_character_mysql_password_policy(self): query_result = CompletedProcess( [],