Skip to content

Commit

Permalink
Fix Python lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tokarski <[email protected]>
  • Loading branch information
stiepan committed Jun 17, 2022
1 parent 9f2478a commit 579a2df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions dali/test/python/test_operator_affine_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion dali/test/python/test_operator_coord_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions dali/test/python/test_operator_gaussian_blur.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 579a2df

Please sign in to comment.