Python Nose Test Framework Overview Six--Framework function aliases

Source: Internet
Author: User
Tags aliases

Before the Python Nose Test framework Comprehensive introduction of the nose framework of the basic composition, but in the actual should we will go to setup_function and other names, after viewing the pipe network, we list the next nose framework function alias

1. Functions written in __init__.py in the package

setup_package     or Setuppackage can also teardown_package     or teardownpackage can also be

2. Use cases composed of function forms

Setup_module      or Setupmodule can also teardown_module      or Teardownmodule can also be

3. Use cases of class form composition

Setup_class     or Setupall can also be     teardown_class or Teardownall can also be

4. Execute before and after each use case in the class form

Setup can also be used    with Setupteardown   or TearDown

5, function form use case, each use case before and after execution

Setup_function/ teardown_function can use any function name because you want to use the ' @with_setup ' adorner

Python Nose Test Framework Overview Six--Framework function aliases

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.