@@ -58,19 +58,6 @@ related to testing Odoo content (modules, mainly):
5858
5959.. autofunction :: odoo.tests.tagged
6060
61- By default, tests are run once right after the corresponding module has been
62- installed. Test cases can also be configured to run after all modules have
63- been installed, and not run right after the module installation::
64-
65- # coding: utf-8
66- from odoo.tests import HttpCase, tagged
67-
68- # This test should only be executed after all modules have been installed.
69- @tagged('-at_install', 'post_install')
70- class WebsiteVisitorTests(HttpCase):
71- def test_create_visitor_on_tracked_page(self):
72- Page = self.env['website.page']
73-
7461The most common situation is to use
7562:class: `~odoo.tests.TransactionCase ` and test a property of a model
7663in each method::
@@ -190,7 +177,7 @@ they're not going to get run:
190177 import unittest
191178 from odoo.tests import tagged
192179
193- @tagged (' standard' , ' at_install ' )
180+ @tagged (' standard' , ' post_install ' )
194181 class SmallTest (unittest .TestCase ):
195182 ...
196183
@@ -234,15 +221,19 @@ Special tags
234221 :option: `--test-tags <odoo-bin --test-tags> ` also defaults to ``standard ``.
235222
236223 That means untagged test will be executed by default when tests are enabled.
237- - ``at_install ``: Means that the test will be executed right after the module
238- installation and before other modules are installed. This is a default
239- implicit tag.
224+
240225- ``post_install ``: Means that the test will be executed after all the modules
241- are installed. This is what you want for HttpCase tests most of the time.
226+ are installed. This is a default implicit tag.
227+
228+ - ``at_install ``: Means that the test will be executed right after the module
229+ installation and before other modules are installed.
230+
231+ This should be used seldomly as it prevents test runs from being parallelized
232+ on runbot. A valuable addition is a comment above to test to explain why it
233+ needs to be run before other modules are installed.
242234
243- Note that this is *not exclusive * with ``at_install ``, however since you
244- will generally not want both ``post_install `` is usually paired with
245- ``-at_install `` when tagging a test class.
235+ Note that this is *exclusive * with ``post_install `` so ``at_install `` is
236+ usually paired with ``-post_install `` when tagging a test class.
246237
247238Examples
248239~~~~~~~~
0 commit comments