allow assert in python tests?
Created by: germasch
In #1247, I'm hitting an issue where I added some tests that verify that I'm getting the expected result using the assert
statement in Python. That's how it's commonly done in Python, in fact that's how pytest
is doing it.
I looked in another python test, and the method currently used there appears to be
if(attrStringData[0] != "one"):
raise ValueError('attrStringData[0] failed')
which will work, but it's more code to write and less explicit when it actually fails, compared to
assert attrStringData[0] == "one"
It looks like it's an easy change to have codacy accept assert
use: https://github.com/heilaaks/snippy/commit/c8bfa51f64f0161572b43a2f726133b148e12c97