refactor(): 优化测试用例数据的处理,优化代码结构

- 新增用例生成器和注册器
- 优化文件处理
This commit is contained in:
2025-06-03 21:42:57 +08:00
parent 2e9f1c12f7
commit 300b5a92d4
16 changed files with 468 additions and 293 deletions

View File

@@ -33,13 +33,13 @@ class DBServer:
db = DBServer(
host=settings.db_host, # ip
port=3306, # 端口
user='root', # 用户名
password='mysql_hNahSe', # 密码
database='answer' # 库名
port=settings.db_port, # 端口
user=settings.db_user, # 用户名
password=settings.db_password, # 密码
database=settings.db_database # 库名
)
if __name__ == '__main__':
...
res = db.execute_sql('select username from user where id=1;')
print(res[0])
# res = db.execute_sql('select username from user where id=1;')
# print(res[0])