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

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

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