pytest测试

import pytest

#定义的函数必须以test开头
def test_a():
	print("test_a")
	assert 1

import pytest

#定义的函数必须以test开头
def test_a():
	print("test_a")
	assert 1

def test_b():
	print("test_b")
	assert 0

if __name__ == '__main__':
	pytest.main("pytest测试.py")

posted @ 2020-09-05 07:44  一只小白呀  阅读(113)  评论(0)    收藏  举报