Skip to content
Snippets Groups Projects
Commit 8d7e49b4 authored by Julius's avatar Julius
Browse files

fixed small errors

parent 07ac7ddd
No related branches found
No related tags found
1 merge request!36Resolve "Automatic Property Testing"
Pipeline #1596286 failed
......@@ -37,7 +37,7 @@ conf_intervals_strategy = st.one_of(
),
arrays(np.float64, st.integers(min_value=1, max_value=10)),
)
tick_label_strategy = st.one_of(st.none(), st.lists(st.text(), min_size=1))
tick_labels_strategy = st.one_of(st.none(), st.lists(st.text(), min_size=1))
@given(
......@@ -47,7 +47,7 @@ tick_label_strategy = st.one_of(st.none(), st.lists(st.text(), min_size=1))
bootstrap=bootstrap_strategy,
usermedians=usermedians_strategy,
conf_intervals=conf_intervals_strategy,
tick_label=tick_label_strategy,
tick_labels=tick_labels_strategy,
)
def test_box_properties(
x: Any,
......@@ -56,7 +56,7 @@ def test_box_properties(
bootstrap: Any,
usermedians: Any,
conf_intervals: Any,
tick_label: Any,
tick_labels: Any,
) -> None:
plt.close()
serializer = MatplotlibSerializer()
......@@ -70,7 +70,7 @@ def test_box_properties(
bootstrap=bootstrap,
usermedians=usermedians,
conf_intervals=conf_intervals,
tick_label=tick_label,
tick_labels=tick_labels,
)
except Exception as _e:
plt.close()
......@@ -82,7 +82,7 @@ def test_box_properties(
bootstrap=bootstrap,
usermedians=usermedians,
conf_intervals=conf_intervals,
labels=tick_label,
tick_labels=tick_labels,
)
assert serializer.to_json() != "{}", "Serialized JSON is empty check input"
plt.close()
......@@ -19,7 +19,7 @@ x_strategy = st.one_of(
@st.composite
def matrix_triplet_strategy(draw, min_dim=1, max_dim=10, min_value=0, max_value=100):
def matrix_triplet_strategy(draw, min_dim=1, max_dim=10, min_value=0, max_value=100): # type: ignore
rows = draw(st.integers(min_value=min_dim, max_value=max_dim))
cols = draw(st.integers(min_value=min_dim, max_value=max_dim))
......@@ -49,10 +49,10 @@ def test_surface_properties(
_, serializer_ax = serializer.subplots(subplot_kw={"projection": "3d"})
_fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
try:
ax.surface(x, y, z)
ax.plot_surface(x, y, z)
except Exception as _e:
plt.close()
else:
serializer_ax.surface(x, y, z)
serializer_ax.plot_surface(x, y, z)
assert serializer.to_json() != "{}", "Serialized JSON is empty check input"
plt.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment