Skip to content
📔 阅读量:

断言语句

YouQu3 自带多种断言语句,几乎满足了所有的断言场景;

用例中使用方法

APP 工程自有断言模块:assert_method.py,它继承了 YouQu3 框架的断言库:

python
# assert_method.py

from youqu3.assertx import Assert

class AssertMethod(Assert):
    """AssertMethod"""

用例基类 BaseCase 继承 AssertMethod

python
# base_case.py

from method.assert_method import AssertMethod
from youqu3.webui import WebAssert

class BaseCase(AssertMethod, WebAssert):
    """用例基类"""

用例中通过 self 调用所有的断言语句:

python
class TestMyCase(BaseCase):

    def test_mycase_001(self):
        """my case 001"""
        self.assert_xxx

方法明细

python
<!--@include: ../../../youqu3/assertx.py-->