当代数据库管理系统课程实验二
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

27 lines
587 B

import requests
import threading
from urllib.parse import urljoin
from be import serve
from fe import conf
thread: threading.Thread = None
# 修改这里启动后端程序,如果不需要可删除这行代码
def run_backend():
# rewrite this if rewrite backend
serve.be_run()
def pytest_configure(config):
global thread
print("frontend begin test")
thread = threading.Thread(target=run_backend)
thread.start()
def pytest_unconfigure(config):
url = urljoin(conf.URL, "shutdown")
requests.get(url)
thread.join()
print("frontend end test")