This silents the reported issue in codacy about python asserts:
Use of assert detected. The enclosed code will be removed when
compiling to optimised byte code.
The concern is valid about python asserts, but they are used in tests
and python is not run with optimised byte code.
Solution taken from codacy website
https://support.codacy.com/hc/en-us/articles/207994335-Code-Patterns