We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff94974 commit 78b59a0Copy full SHA for 78b59a0
1 file changed
models/PaddleScience/CI/test_apis/test_mkdocs_serve.py
@@ -0,0 +1,19 @@
1
+import os
2
+import sys
3
+import pytest
4
+import time
5
+
6
+def test_mkdocs_serve():
7
+ """
8
+ 检查mkdocs serve命令是否正常工作
9
10
+ os.system("mkdocs serve -a 127.0.0.1:6007 -f ../../mkdocs.yml >test_mkdocs_serve.log 2>&1 &")
11
+ time.sleep(50)
12
+ with open("test_mkdocs_serve.log", 'r') as file:
13
+ log_content = file.read()
14
+ assert "WARNING" not in log_content and "ERROR" not in log_content
15
16
+if __name__ == '__main__':
17
+ # 使用 pytest 模块运行测试函数
18
+ code = pytest.main([sys.argv[0]])
19
+ sys.exit(code)
0 commit comments