常用方法:

  • assert xx 判断xx为真
  • assert not xx 判断xx不为真
  • assert a in b 判断b包含a
  • assert a == b 判断a等于b
  • assert a != b 判断a不等于b

demo:

pytest+assert使用方法

相关文章:

  • 2021-06-19
  • 2021-05-20
  • 2021-05-24
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-10-06
猜你喜欢
  • 2021-11-28
  • 2021-07-10
  • 2021-11-22
  • 2021-04-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案