Skip to content

Commit ecffaab

Browse files
authored
Fix running pytest in strict mode (#11342)
1 parent 4e2334d commit ecffaab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rerun_py/tests/unit/test_any_values.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def test_bad_any_value() -> None:
3939
class Foo:
4040
pass
4141

42+
rr.set_strict_mode(False)
4243
with pytest.warns(RerunWarning) as warnings:
4344
values = rr.AnyValues(bad_data=[Foo()])
4445

@@ -76,6 +77,7 @@ class Foo:
7677

7778

7879
def test_none_any_value() -> None:
80+
rr.set_strict_mode(False)
7981
with pytest.warns(RerunWarning) as warnings:
8082
running_warning_count = 0
8183

@@ -162,6 +164,7 @@ def test_empty_any_values(container_type: type[Any]) -> None:
162164
f"str_array_{container_type.__name__}": container_type(["str"]),
163165
})
164166

167+
rr.set_strict_mode(False)
165168
with pytest.warns(RerunWarning) as warnings:
166169
batches = list(values.as_component_batches())
167170
assert len(batches) == 0
@@ -189,6 +192,7 @@ def test_any_values_numpy() -> None:
189192

190193

191194
def test_any_values_with_field() -> None:
195+
rr.set_strict_mode(False)
192196
with pytest.warns(DeprecationWarning, match="`rr.AnyValues.with_field` using a component descriptor is deprecated"):
193197
values = rr.AnyValues().with_component_from_data(
194198
descriptor=rr.ComponentDescriptor("value"),

0 commit comments

Comments
 (0)