first commit
This commit is contained in:
1 parent
d2b2284bd4
commit
92b1584aaa
10 files changed
+142
-13
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
import logging
|
||||
import pytest
|
||||
|
||||
|
||||
# 在测试开始前配置日志
|
||||
@pytest.fixture(autouse=True, scope="session")
|
||||
def configure_logging():
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)",
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
# 返回一个日志对象供测试函数使用
|
||||
return logging.getLogger()
|
||||
Reference in new issue
Block a user