8.4.2:比较运算符

比较运算符也称为关系运算符,用于比较两个表达式的值之间的关系。运算结果为布尔类型,返回布尔类型的表达式称为布尔表达式。比较运算符根据布尔表达式的输出结果,返回true、false或unkown值。

一共6种比较运算符:

①=

②!=或<>

③>

④<

⑤>=

⑥<=



platform win32 -- Python 3.13.5, pytest-8.4.2, pluggy-1.6.0 -- E:\project\frame\.venv\Scripts\python.exe cachedir: .pytest_cache metadata: {'Python': '3.13.5', 'Platform': 'Windows-10-10.0.19045-SP0', 'Packages': {'pytest': '8.4.2', 'pluggy': '1.6.0'}, 'Plugins': {'allure-pytest': '2.15.0', 'Faker': '37.12.0', 'base-url': '2.1.0', 'html': '4.1.1', 'metadata': '3.1.1', 'ordering': '0.6', 'playwright': '0.7.1', 'rerunfailures': '16.0.1', 'xdist': '3.8.0'}, 'JAVA_HOME': 'D:\\System Tools\\jdk1.8', 'Base URL': ''} rootdir: E:\project\frame configfile: pytest.ini plugins: allure-pytest-2.15.0, Faker-37.12.0, base-url-2.1.0, html-4.1.1, metadata-3.1.1, ordering-0.6, playwright-0.7.1, rerunfailures-16.0.1, xdist-3.8.0 collecting ... collected 0 items / 1 error =================================== ERRORS ==================================== _____________________ ERROR collecting 测试用例/test_case.py ______________________ 测试用例\test_case.py:16: in <module> from commons.web_keys import keyword commons\web_keys.py:18: in <module> class KeyWord: commons\web_keys.py:31: in KeyWord tag: str = "element" | "page", ^^^^^^^^^^^^^^^^^^ E TypeError: unsupported operand type(s) for |: 'str' and 'str' ============================== warnings summary =============================== .venv\Lib\site-packages\_pytest\config\__init__.py:1474 E:\project\frame\.venv\Lib\site-packages\_pytest\config\__init__.py:1474: PytestConfigWarning: Unknown config option: playwright_isolation_strategy self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info =========================== ERROR 测试用例/test_case.py - TypeError: unsupported operand type(s) for |: '... !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ========================= 1 warning, 1 error in 0.32s =========================
最新发布
11-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值