Skip to content

Commit 64153e8

Browse files
fix warnings
1 parent d181ee2 commit 64153e8

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

tripy/tests/backend/api/test_executable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ def test_kwargs(self, single_return_executable):
6666
(
6767
[tp.ones((2, 2), dtype=tp.float32), tp.ones((2, 2), dtype=tp.float32)],
6868
{"b": tp.ones((2, 2), dtype=tp.float32)},
69-
"Extra keyword arguments: \['b'\]",
69+
r"Extra keyword arguments: \['b'\]",
7070
),
7171
(
7272
[tp.ones((2, 2), dtype=tp.float32), tp.ones((2, 2), dtype=tp.float32)],
7373
{"c": tp.ones((2, 2), dtype=tp.float32)},
74-
"Extra keyword arguments: \['c'\]",
74+
r"Extra keyword arguments: \['c'\]",
7575
),
7676
],
7777
)

tripy/tests/frontend/module/test_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_get_set_attr(self, network):
4646

4747
def test_incompatible_parameter_cannot_be_set(self, network):
4848
with helper.raises(
49-
tp.TripyException, match="New parameter shape: \[2, 3\] is not compatible with current shape: \[2\]"
49+
tp.TripyException, match=r"New parameter shape: \[2, 3\] is not compatible with current shape: \[2\]"
5050
):
5151
network.param = tp.Parameter(tp.ones((2, 3)))
5252

tripy/tests/frontend/trace/ops/test_reshape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_incorrect_dims(self):
5555

5656
with helper.raises(
5757
tp.TripyException,
58-
match="number of output elements \(1\) doesn't match expected number of elements \(4\)",
58+
match=r"number of output elements \(1\) doesn't match expected number of elements \(4\)",
5959
has_stack_info_for=[a, b],
6060
):
6161
b.eval()

tripy/tests/integration/test_stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ def test_stack_different_shapes(self):
5757
b = tp.ones((4, 3))
5858
with raises(
5959
tp.TripyException,
60-
match="error: shapes of operand \(0\) and \(1\) are not compatible at non-concat index 1:",
60+
match=r"error: shapes of operand \(0\) and \(1\) are not compatible at non-concat index 1:",
6161
):
6262
tp.stack([a, b]).eval()

tripy/tests/performance/test_perf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def run_inference():
4040
def test_perf_comparative(perf_case):
4141
compiled_tripy_module, compiled_torch_module, inputs, perf_threshold = perf_case
4242

43-
WARM_UP_RUNS = 2
44-
ITERATIONS = 100
43+
WARM_UP_RUNS = 10
44+
ITERATIONS = 250
4545

4646
# Time Tripy
4747
stream = tp.default_stream()

tripy/tests/test_function_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_missing_arguments_gives_sane_error(self, registry):
189189
def func(a: int, b: int):
190190
return a + b
191191

192-
with helper.raises(TripyException, match="Some required arguments were not provided: \['a'\]"):
192+
with helper.raises(TripyException, match=r"Some required arguments were not provided: \['a'\]"):
193193
registry["test"](b=0)
194194

195195
def test_func_overload_caches_signature(self, registry):

0 commit comments

Comments
 (0)