tests: use assertRaisesRegex instead of assertRaises in test_stream_class.py
Using assertRaises is not very robust. We can expect a ValueError to be
raised, but in reality the test can pass because a ValueError different
than the one we are expecting is raised, and we don't actually test what
we mean to.
Use assertRaisesRegex throughout test_stream_class.py, which validates
the exception message in addition to the type.
I have also updated a few exception messages in the process, where I
thought they could be made clearer.
Change-Id: I1419950521210e778fb49f7b92f6563c546f0150
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2304
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.026429 seconds and 4 git commands to generate.