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

skip-test

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

  • web-security1
  • two-user1
  • response-type1
  • remote2
  • AWS2
  • android1
  • ebook2
  • ec2-family1
  • gzip1
  • go4
  • tag2
  • powerline1
  • devops1
  • regex1
  • cloud-watch2
  • gherkin1
  • vpc1
  • project1
  • linux2
  • resource_group1
  • ...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.

▲