老布這麼說
  • Archives
  • Categories
  • Tags
  • About

pytest

2022-08-23
pytest-skip-test-case

在使用 pytest 時,有些 test-case 是在 開發 階段才需要跑。上到 daily job 時,可以跳過這些 test-case
找了一下 pytest 的作法,可以用 mark 的方式達成

Reference

  • python - Pytest - how to skip tests unless you declare an option/flag? - Stack Overflow
  • How to use skip and xfail to deal with tests that cannot succeed — pytest documentation
  • How to mark test functions with attributes — pytest documentation
Read More

Tag Cloud

  • url1
  • tool5
  • gitbook5
  • test1
  • scrapy1
  • identity1
  • goland3
  • environment1
  • code-navigate1
  • cloud-watch2
  • website1
  • chrom1
  • peering1
  • detection1
  • crumb1
  • ctext1
  • chrome1
  • fargate1
  • iMazing1
  • oracle1
  • ...334

Recent Posts

  • python-timestamp
  • aws-sns-sqs
  • software-architecture
  • aws-api-gateway-private
  • aws-lambda-sqs

Links

  • Freemind
  • My Github

© 2022 老布 with help from Hexo and Twitter Bootstrap. Theme by Freemind.

▲