Skip to content

Commit bdd041a

Browse files
Update tests/utils/test_nvcodec_utils.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Abhinav Garg <abhinavg@stanford.edu>
1 parent 95f25bf commit bdd041a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/utils/test_nvcodec_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ def test_generate_decoded_frames_partial_batch(self, mock_cvcuda: Any, mock_torc
797797

798798
# Setup side effect for as_tensor to return different mocks
799799
def as_tensor_side_effect(*args: Any, **_kwargs: Any) -> Any:
800-
if len(args) > 0 and hasattr(args[0], "cuda"):
800+
if len(args) == 2 and isinstance(args[1], str):
801801
return mock_cvcuda_nhwc
802802
return mock_cvcuda_tensor
803803

0 commit comments

Comments
 (0)