Skip to content

Commit 0f302ab

Browse files
committed
to add pytest demo
1 parent e90471d commit 0f302ab

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

case/pytest/test_pytest_demo.py

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_cmd_0():
8+
''' the test cmd '''
9+
print('\nthe test_cmd_0 ended.')
10+
11+
12+
if __name__ == "__main__":
13+
''' the 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)