Skip to content

Commit 7e3cdbc

Browse files
committed
添加 unittest 和 pytest 模板
1 parent 3e5060c commit 7e3cdbc

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding:utf-8 -*-
2+
3+
import os
4+
import pytest
5+
6+
7+
def test_xxx():
8+
''' the test case method '''
9+
pass
10+
11+
12+
if __name__ == "__main__":
13+
''' the pytest main point '''
14+
retcode = pytest.main(args=['-v', '-s', os.path.abspath(__file__)])
15+
# retcode = pytest.main(args=['--fixtures', os.path.abspath(__file__)])
16+
# retcode = pytest.main(args=['--collect-only', os.path.abspath(__file__)])
17+
print(retcode)

0 commit comments

Comments
 (0)