Skip to content

Commit be437dc

Browse files
Fixes warnings in various tests
1 parent ac307a5 commit be437dc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tripy/tests/backend/api/test_compile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -346,7 +346,7 @@ def func(data_dict):
346346
"a": {"inner": tp.ones((2, 3), dtype=tp.float32).eval()},
347347
"b": {"list": [tp.ones((2, 3), dtype=tp.float32).eval()]},
348348
}
349-
with helper.raises(tp.TripyException, match="Missing runtime tensor for input `data_dict\.b\.list\[1\]`."):
349+
with helper.raises(tp.TripyException, match=r"Missing runtime tensor for input `data_dict\.b\.list\[1\]`."):
350350
compiled_func(bad_dict)
351351

352352
# Wrong shape for b.list[1] should trigger a shape/device validation error
@@ -367,5 +367,5 @@ def func(data_list):
367367

368368
bad_list = [tp.ones((2, 3), dtype=tp.float32).eval(), {"not": tp.ones((2, 3), dtype=tp.float32).eval()}]
369369

370-
with helper.raises(tp.TripyException, match="Missing runtime tensor for input `data_list\[1\]\[0\]`."):
370+
with helper.raises(tp.TripyException, match=r"Missing runtime tensor for input `data_list\[1\]\[0\]`."):
371371
compiled_func(bad_list)

tripy/tests/integration/test_conv_transpose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -108,7 +108,7 @@ def test_conv_transpose(case, dtype, eager_or_compiled):
108108
slices = [slice(None), slice(None)]
109109
for low, high in case.padding:
110110
slices.append(slice(low, -high if high != 0 else None))
111-
torch_out = torch_out.__getitem__(slices).contiguous().clone()
111+
torch_out = torch_out[tuple(slices)].contiguous().clone()
112112

113113
tripy_conv_transpose = tp.ConvTranspose(
114114
IN_CHANNELS,

0 commit comments

Comments
 (0)