avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
336 stars 335 forks source link

avocado/core/output.py: use fstrings instead of addition of strings #5895

Closed clebergnu closed 3 months ago

clebergnu commented 3 months ago

First, there's a slight performance advantage in using fstrings instead of adding strings together. Second, this changes makes the output utility not enforce policy when it comes to types, that is, if the message to be printed is "None", it will be converted to a string, instead of raising TypeError.