Skip to content

Commit

Permalink
Silence a CodeQL warning about overwritten value in tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
  • Loading branch information
mzient committed Sep 30, 2024
1 parent fe5afd7 commit e67cd6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dali/test/python/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,7 @@ def pdef(to_cpu):
return to_cpu(gpu)

with assert_raises(RuntimeError, glob="doesn't support transition from GPU to CPU"):
pipe = pdef(lambda gpu: gpu.cpu()) # this will raise an error at construction time
_ = pdef(lambda gpu: gpu.cpu()) # this will raise an error at construction time

pipe = pdef(lambda gpu: gpu._to_backend("cpu")) # this will not raise errors until build-time

Expand Down

0 comments on commit e67cd6c

Please sign in to comment.