1 Star 0 Fork 194

czx / apiAutoTest

forked from 7y / apiAutoTest 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
testdemo.py 517 Bytes
一键复制 编辑 原始数据 按行查看 历史
czx520520 提交于 2024-03-26 11:53 . 测试111
import pytest
@pytest.fixture(scope='module') #名为login的fixture,完成登陆和注册操作
def login():
print('登陆操作~~~')
yield
print('注销操作~~~')
@pytest.mark.usefixtures("login")
class TestClass1:
def test_case1(self):
print("TestClass1:test_case1")
def test_case2(self):
print("TestClass1:test_case2")
class TestClass2:
def test_case1(self):
print("TestClass2:test_case1")
def test_case2(self):
print("TestClass2:test_case2")
Python
1
https://gitee.com/czx_pyTest/apiAutoTest.git
git@gitee.com:czx_pyTest/apiAutoTest.git
czx_pyTest
apiAutoTest
apiAutoTest
master

搜索帮助