diff --git a/.github/workflows/dev_python3_10.yml b/.github/workflows/dev_python3_10.yml index 48335dc..54a9d3a 100644 --- a/.github/workflows/dev_python3_10.yml +++ b/.github/workflows/dev_python3_10.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r dev_requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/dev_python3_11.yml b/.github/workflows/dev_python3_11.yml index 262cf89..5b1658b 100644 --- a/.github/workflows/dev_python3_11.yml +++ b/.github/workflows/dev_python3_11.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r dev_requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/dev_python3_8.yml b/.github/workflows/dev_python3_8.yml index fdcd925..823017f 100644 --- a/.github/workflows/dev_python3_8.yml +++ b/.github/workflows/dev_python3_8.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r dev_requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/dev_python3_9.yml b/.github/workflows/dev_python3_9.yml index 3d51bf1..2347ece 100644 --- a/.github/workflows/dev_python3_9.yml +++ b/.github/workflows/dev_python3_9.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r dev_requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/stable_python3_10.yml b/.github/workflows/stable_python3_10.yml index c628f1a..66e15f3 100644 --- a/.github/workflows/stable_python3_10.yml +++ b/.github/workflows/stable_python3_10.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/stable_python3_11.yml b/.github/workflows/stable_python3_11.yml index ee46957..d33b9b9 100644 --- a/.github/workflows/stable_python3_11.yml +++ b/.github/workflows/stable_python3_11.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/stable_python3_8.yml b/.github/workflows/stable_python3_8.yml index 03483f0..c69f01f 100644 --- a/.github/workflows/stable_python3_8.yml +++ b/.github/workflows/stable_python3_8.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/.github/workflows/stable_python3_9.yml b/.github/workflows/stable_python3_9.yml index 70a76e3..293f27f 100644 --- a/.github/workflows/stable_python3_9.yml +++ b/.github/workflows/stable_python3_9.yml @@ -23,10 +23,12 @@ jobs: run: | python -m pip install --upgrade pip wheel pip install -r requirements.txt + - name: Test Screen Module run: python ./test/unit_test/screen/screen_test.py - name: Test Screenshot run: python ./test/unit_test/screen/screenshot_test.py + - name: Test Keyboard type Function run: python ./test/unit_test/keyboard/keyboard_type_test.py - name: Test Keyboard write Function @@ -36,40 +38,56 @@ jobs: run: python ./test/unit_test/keyboard/keyboard_is_press_test.py - name: Test Keyboard hotkey Function run: python ./test/unit_test/keyboard/hotkey_test.py + - name: Test Mouse Module run: python ./test/unit_test/mouse/mouse_test.py - name: Test Scroll Module run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Exceptions run: python ./test/unit_test/exception/auto_control_exception_test.py + - name: Test Critical Exit run: python ./test/unit_test/critical_exit/critical_exit_test.py - name: Test Real Critical Situation run: | python ./test/unit_test/critical_exit/real_critical_test.py exit 0 + - name: Test Record Module run: python ./test/unit_test/record/record_test.py - name: Test Total Record run: python ./test/unit_test/total_record/total_record_test.py + - name: Test Execute Action run: python ./test/unit_test/execute_action/execute_action_test.py + - name: Test Json Module run: python ./test/unit_test/json/json_test.py - name: Test Generate Json Report run: python ./test/unit_test/generate_report/json_report.py - # timeout - name: Test Timeout Module run: python ./test/unit_test/timeout/timeout_test.py - - name: Test Argparse - run: python ./test/unit_test/argparse/argparse_test.py - name: Test Generate HTML Report run: python ./test/unit_test/generate_report/html_report_test.py + + - name: Test Argparse + run: python ./test/unit_test/argparse/argparse_test.py + - name: Test Callback Module run: python ./test/unit_test/callback/callback_test.py + - name: Test Create Project Function run: python ./test/unit_test/create_project_file/create_project_test.py + - name: Test Interval Scheduler run: python ./test/unit_test/scheduler_test/sec_interval_test.py - name: Test Cron Scheduler - run: python ./test/unit_test/scheduler_test/sec_cron_test.py \ No newline at end of file + run: python ./test/unit_test/scheduler_test/sec_cron_test.py + + - name: Test Get Mouse Info + run: python ./test/unit_test/get_info/mouse_info.py + - name: Test Get Special Info + run: python ./test/unit_test/get_info/special_info.py + - name: Test Get Keyboard Info + run: python ./test/unit_test/get_info/keyboard_info.py diff --git a/dev.toml b/dev.toml index 68898f4..553baee 100644 --- a/dev.toml +++ b/dev.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "je_auto_control_dev" -version = "0.0.90" +version = "0.0.91" authors = [ { name = "JE-Chen", email = "jechenmailman@gmail.com" }, ] diff --git a/je_auto_control/__init__.py b/je_auto_control/__init__.py index 34ade20..3ed7d30 100644 --- a/je_auto_control/__init__.py +++ b/je_auto_control/__init__.py @@ -108,7 +108,7 @@ "click_mouse", "mouse_keys_table", "get_mouse_position", "press_mouse", "release_mouse", "mouse_scroll", "set_mouse_position", "special_mouse_keys_table", "keyboard_keys_table", "press_keyboard_key", "release_keyboard_key", "type_keyboard", "check_key_is_press", - "write", "hotkey", "start_exe", "SchedulerManager", + "write", "hotkey", "start_exe", "SchedulerManager", "get_keyboard_keys_table", "screen_size", "screenshot", "locate_all_image", "locate_image_center", "locate_and_click", "CriticalExit", "AutoControlException", "AutoControlKeyboardException", "AutoControlMouseException", "AutoControlCantFindKeyException", diff --git a/je_auto_control/linux_with_x11/core/utils/x11_linux_display.py b/je_auto_control/linux_with_x11/core/utils/x11_linux_display.py index 6073db0..9395355 100644 --- a/je_auto_control/linux_with_x11/core/utils/x11_linux_display.py +++ b/je_auto_control/linux_with_x11/core/utils/x11_linux_display.py @@ -2,7 +2,6 @@ from je_auto_control.utils.exception.exception_tags import linux_import_error from je_auto_control.utils.exception.exceptions import AutoControlException -from je_auto_control.utils.logging.loggin_instance import auto_control_logger if sys.platform not in ["linux", "linux2"]: raise AutoControlException(linux_import_error) @@ -13,4 +12,3 @@ # get x system display display = Display(os.environ['DISPLAY']) - diff --git a/je_auto_control/utils/generate_report/generate_html_report.py b/je_auto_control/utils/generate_report/generate_html_report.py index a9c7d28..00061e6 100644 --- a/je_auto_control/utils/generate_report/generate_html_report.py +++ b/je_auto_control/utils/generate_report/generate_html_report.py @@ -1,5 +1,3 @@ -import sys -import typing from threading import Lock from je_auto_control.utils.exception.exception_tags import html_generate_no_data_tag @@ -132,10 +130,8 @@ def make_html_table(event_str: str, record_data: dict, table_head: str) -> str: def generate_html() -> str: auto_control_logger.info("generate_html") - """ - this function will create html string - :return: html_string - """ + """ this function will create html string + :return: html_string """ if len(test_record_instance.test_record_list) == 0: raise AutoControlHTMLException(html_generate_no_data_tag) else: diff --git a/je_auto_control/utils/generate_report/generate_xml_report.py b/je_auto_control/utils/generate_report/generate_xml_report.py index f1383ed..2b72e84 100644 --- a/je_auto_control/utils/generate_report/generate_xml_report.py +++ b/je_auto_control/utils/generate_report/generate_xml_report.py @@ -1,6 +1,6 @@ from threading import Lock +from typing import Tuple, Union from xml.dom.minidom import parseString -from typing import Tuple, Dict, Union from je_auto_control.utils.generate_report.generate_json_report import generate_json from je_auto_control.utils.logging.loggin_instance import auto_control_logger @@ -45,7 +45,6 @@ def generate_xml_report(xml_file_name: str = "default_name"): try: with open(xml_file_name + "_success.xml", "w+") as file_to_write: file_to_write.write(success_xml) - pass except Exception as error: auto_control_logger.error( f"generate_xml_report, xml_file_name: {xml_file_name}, " diff --git a/je_auto_control/windows/core/utils/win32_vk.py b/je_auto_control/windows/core/utils/win32_vk.py index 12715c4..c9c869d 100644 --- a/je_auto_control/windows/core/utils/win32_vk.py +++ b/je_auto_control/windows/core/utils/win32_vk.py @@ -6,9 +6,8 @@ if sys.platform not in ["win32", "cygwin", "msys"]: raise AutoControlException(windows_import_error) -""" -windows mouse virtual keycode -""" +# windows mouse virtual keycode + win32_MOVE: int = 0x0001 win32_LEFTDOWN: int = 0x0002 diff --git a/je_auto_control/wrapper/auto_control_record.py b/je_auto_control/wrapper/auto_control_record.py index 8b04a1e..255e06c 100644 --- a/je_auto_control/wrapper/auto_control_record.py +++ b/je_auto_control/wrapper/auto_control_record.py @@ -17,7 +17,7 @@ def record() -> None: if sys.platform == "darwin": raise AutoControlException(macos_record_error) record_action_to_list("record", None) - return recorder.record() + recorder.record() except Exception as error: record_action_to_list("record", None, repr(error)) auto_control_logger.error(f"record, failed: {repr(error)}") diff --git a/je_auto_control/wrapper/auto_control_screen.py b/je_auto_control/wrapper/auto_control_screen.py index 55bb9d3..e7aa71e 100644 --- a/je_auto_control/wrapper/auto_control_screen.py +++ b/je_auto_control/wrapper/auto_control_screen.py @@ -1,4 +1,3 @@ -import sys from typing import Tuple, List import cv2 diff --git a/pyproject.toml b/pyproject.toml index a17cbf1..ad3574a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "je_auto_control" -version = "0.0.150" +version = "0.0.151" authors = [ { name = "JE-Chen", email = "jechenmailman@gmail.com" }, ] diff --git a/test/unit_test/generate_report/xml_report_test.py b/test/unit_test/generate_report/xml_report_test.py index b274323..d013e54 100644 --- a/test/unit_test/generate_report/xml_report_test.py +++ b/test/unit_test/generate_report/xml_report_test.py @@ -41,4 +41,3 @@ ] print("\n\n") execute_action(test_list) -a \ No newline at end of file diff --git a/test/unit_test/get_info/keyboard_info.py b/test/unit_test/get_info/keyboard_info.py new file mode 100644 index 0000000..2ad7038 --- /dev/null +++ b/test/unit_test/get_info/keyboard_info.py @@ -0,0 +1,3 @@ +from je_auto_control import get_keyboard_keys_table + +print(get_keyboard_keys_table()) diff --git a/test/unit_test/get_info/mouse_info.py b/test/unit_test/get_info/mouse_info.py new file mode 100644 index 0000000..7ce3ab7 --- /dev/null +++ b/test/unit_test/get_info/mouse_info.py @@ -0,0 +1,3 @@ +from je_auto_control import mouse_keys_table + +print(mouse_keys_table) diff --git a/test/unit_test/get_info/special_info.py b/test/unit_test/get_info/special_info.py new file mode 100644 index 0000000..ed949aa --- /dev/null +++ b/test/unit_test/get_info/special_info.py @@ -0,0 +1,3 @@ +from je_auto_control import get_special_table + +print(get_special_table())