diff --git a/dali/test/python/test_operator_affine_transforms.py b/dali/test/python/test_operator_affine_transforms.py index f5cc3d2ab8d..d8f018ab1e0 100644 --- a/dali/test/python/test_operator_affine_transforms.py +++ b/dali/test/python/test_operator_affine_transforms.py @@ -26,7 +26,7 @@ from nvidia.dali import pipeline_def from sequences_test_utils import sequence_suite_helper, ArgCb, ParamsProvider -from nose_utils import assert_raises, raises +from nose_utils import assert_raises def check_results_sample(T1, mat_ref, T0=None, reverse=False, atol=1e-6): @@ -639,7 +639,8 @@ def mt(): batch0_inp = [mt() for _ in range(batch_size)] batch1_inp = [mt()[i:] for i in range(batch_size)] - with assert_raises(RuntimeError, glob="The input 0 and the input 1 have different number of frames for sample 1"): + expected_msg = "The input 0 and the input 1 have different number of frames for sample 1" + with assert_raises(RuntimeError, glob=expected_msg): @pipeline_def def pipeline(): mts0, mts1 = fn.external_source(lambda _: (batch0_inp, batch1_inp), num_outputs=2) diff --git a/dali/test/python/test_operator_coord_transform.py b/dali/test/python/test_operator_coord_transform.py index 67ecde65743..747e003832c 100644 --- a/dali/test/python/test_operator_coord_transform.py +++ b/dali/test/python/test_operator_coord_transform.py @@ -249,4 +249,5 @@ def mt(sample_desc): (fn.coord_transform, {}, [ArgCb(0, lambda _: points(), False, "gpu")], ["cpu"], "MT"), ] - yield from sequence_suite_helper(rng, "F", [("F**", input_mt_data)], input_broadcast_cases, num_iters) + yield from sequence_suite_helper( + rng, "F", [("F**", input_mt_data)], input_broadcast_cases, num_iters) diff --git a/dali/test/python/test_operator_gaussian_blur.py b/dali/test/python/test_operator_gaussian_blur.py index 61dfe82c2dc..208f0de82e0 100644 --- a/dali/test/python/test_operator_gaussian_blur.py +++ b/dali/test/python/test_operator_gaussian_blur.py @@ -396,9 +396,9 @@ def per_axis_sigma(sample_desc): # test if SequenceOperator properly errors out on per-frame argument when input is expanded only # because of channel-first layout (but there are no frames on the input) -@raises(RuntimeError, "Tensor input for argument window_size is specified per frame (got F layout). " - "In that case, samples in the input 0 must contain frames too. " - "Got layout `CHW` that does not contain frames.") +@raises(RuntimeError, "Tensor input for argument window_size is specified per frame " + "(got F layout). In that case, samples in the input 0 must contain " + "frames too. Got layout `CHW` that does not contain frames.") def test_fail_per_frame_no_frames(): @pipeline_def def pipeline():