About YAML tests

Odoo also supports tests described using YAML data files. Originally, all tests used YAML, and only later were unittest-based tests introduced. While both are supported, and many core addons still include YAML tests, the official documentation currently does not mention the YAML tests. The last documentation on it is available at https://doc.odoo.com/v6.0/contribute/15_guidelines/coding_guidelines_testing/.

Developers with a Python background will probably feel more at home with unittest, since it is a standard Python feature, while YAML tests are Odoo-specific. Clearly, the trend is to prefer unittest over YAML.

Consider YAML tests as an undocumented feature that might be removed without warning in a future Odoo version. ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.