提交 e886d38f authored 作者: 陈泽健's avatar 陈泽健

refactor(预定系统): 重构导入 base 模块的方式

- 移除了各脚本中重复的路径设置代码
- 统一使用 sys.path.append() 方法添加 Base 目录到 sys.path- 更新了导入 base 模块的路径,使用相对路径替代绝对路径
- 优化了代码结构,提高了代码的可维护性和可移植性
上级 c0a21e4d
此差异已折叠。
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -2,18 +2,9 @@ import sys
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -2,18 +2,9 @@ import sys
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
class Server_monitoring_0001:
......
......@@ -2,17 +2,9 @@ import sys
import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -2,17 +2,9 @@ import sys
import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.base import *
from 预定系统.Base.app_base import *
def suite_setup():
STEP(1, "初始化设备adb连接")
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
class same_screen_share_000x:
"""
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
class SameScreenShare:
"""
......
......@@ -5,20 +5,8 @@ from hytest import *
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
......
......@@ -5,18 +5,9 @@ from hytest import *
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化设备1的adb连接")
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -4,19 +4,8 @@ from time import sleep
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化设备adb连接")
......
......@@ -3,20 +3,9 @@ from time import sleep
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
class XFMeeting:
tags = ['展厅巡检','讯飞测试','展厅讯飞转录流程测试']
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
class Operation_maintenance_0001:
tags = ['展厅巡检','运维系统巡检']
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
class UnifiedPlatform:
tags = ['展厅巡检','统一平台系统巡检']
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -2,19 +2,9 @@ import sys
import os
from appium.webdriver.common.appiumby import AppiumBy
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
class UnifiedPlatformTerminal:
tags = ['统一平台终端入会']
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
class MeetingTableCard:
tags = ['展厅巡检','桌牌测试']
......
......@@ -3,19 +3,9 @@ from time import sleep
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from app_base import *
from base import *
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
......
......@@ -3,17 +3,9 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
from app_base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')))
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化设备adb连接")
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
from time import sleep
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
DEFAULT_WAIT_TIME = 20
# 默认等待时间(秒),用于元素加载或操作之间的等待
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
from hytest import *
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from Mqtt_Send import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
from 预定系统.Base.Mqtt_Send import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from Mqtt_Send import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
from 预定系统.Base.Mqtt_Send import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -3,16 +3,8 @@ import os
from hytest import *
# 获取 Base 目录的绝对路径,并加入 sys.path
current_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.abspath(os.path.join(current_dir, '..', '..', 'Base'))
if base_dir not in sys.path:
print(f"Adding Base directory to sys.path: {base_dir}")
sys.path.insert(0, base_dir)
try:
from base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -2,18 +2,9 @@ from time import sleep
import sys
import os
# 兼容 PyInstaller 打包后的路径
if hasattr(sys, '_MEIPASS'):
base_path = sys._MEIPASS
else:
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
base_path = os.path.abspath(base_path)
base_base_path = os.path.join(base_path, 'Base')
if base_base_path not in sys.path:
sys.path.insert(0, base_base_path)
from base import *
# 获取 Base 目录的绝对路径,并加入 sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..' , '..')))
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论