> [ Nice place Better than some reviews give it credit for., > ĭocument 包含大量的文档属性信息,包括 - tokens, token’s reference index, part of speech tags, entities, vectors, sentiment, vocabulary etc. test_date_plannedįor testing specific function with a unique name. For example, if you have a standard test that is also marked as mytest, you can run all standard tests except mytest. The - (minus) prefix is used to deselect test tags that have a previous tag, regardless of whether they are selected by other specified tags. This tag matches tags added to the class using the tagged() decorator.įor testing specific tag.Configuration switch parameters also accept + and - prefixes. The ‘-’ indicates to include or exclude tests conforming to this specification. This means that tests tagged as standard (explicit or implicit) are run by default when Odoo is started with -test-enable.Ĭommand to run test cases with test tags: This option is set to +standard by default. It means -test-enable, so you don't need to specify -test-enable when using -test-tags. You can use -test-tags to select/filter which tests to run on the command line. To run, you have to explicitly select the corresponding tag (mytest). # -*- coding: utf-8 -*-įrom odoo.tests import TransactionCase, 'mytest') If you don't want your tests to run by default, you can remove the default tag. Instead of adding or selecting tags, you can prefix them with a minus sign (-) to remove them. Subclasses of (usually by TransactionCase, SavepointCase, or HttpCase) are automatically marked standard and at_install by default. Post_install is usually paired with -at_install when tagging test classes. Standard - All Odoo tests that acquire from BaseCase are explicitly flagged by default. This is mainly needed for HttpCase tests. Post_install - It means that tests will be run after all modules are installed. Instead of tracking module installations directly, you can also adjust your experiment to track all installed modules.Īt_install - Testing is done immediately after module setup and before various module rollouts. Of course, the tests will run once the comparison module is introduced. Tags are not picked up when using class inheritance. Additionally, the decorator's assertion is that the tag name is a string. ![]() The tagged() decorator can be used on the test class to add or remove tags when assembling the test. ![]() The tags are placed in a set accessible through the "test_tags" property. ![]() Decorator for tagging Points BaseCase objects. Odoo allows you to highlight selections and run test cases.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |