|
1 | 1 | import csv |
2 | 2 | import io |
| 3 | +import math |
3 | 4 | import os |
4 | | - |
5 | | -import pytest |
6 | 5 | from statistics import NormalDist |
7 | | -import math |
| 6 | + |
8 | 7 | import matplotlib.pyplot as plt |
9 | 8 | import numpy as np |
| 9 | +import pytest |
10 | 10 |
|
11 | | -from cat_ai.statistical_analysis import analyse_sample_from_test, StatisticalAnalysis |
| 11 | +from cat_ai.statistical_analysis import StatisticalAnalysis, analyse_sample_from_test |
12 | 12 |
|
13 | 13 |
|
14 | 14 | @pytest.mark.parametrize( |
@@ -113,9 +113,7 @@ def test_failure_rate_bar_graph(snapshot): |
113 | 113 | fig, ax = plt.subplots(figsize=(10, 6)) |
114 | 114 |
|
115 | 115 | # Plot bars with error bars |
116 | | - bars = ax.bar( |
117 | | - failure_counts, rates, yerr=errors, capsize=5, color="steelblue", alpha=0.7, width=8 |
118 | | - ) |
| 116 | + ax.bar(failure_counts, rates, yerr=errors, capsize=5, color="steelblue", alpha=0.7, width=8) |
119 | 117 |
|
120 | 118 | # # Add annotations on top of each bar |
121 | 119 | # for bar, rate, error in zip(bars, rates, errors): |
@@ -157,7 +155,7 @@ def test_failure_rate_graph(snapshot): |
157 | 155 | failures = np.arange(0, 100) |
158 | 156 |
|
159 | 157 | # Calculate results for each rate |
160 | | - results = [analyse_sample_from_test(f, t) for f, t in zip(failures, totals)] |
| 158 | + results = [analyse_sample_from_test(f, t) for f, t in zip(failures, totals, strict=True)] |
161 | 159 |
|
162 | 160 | # Extract data for plotting |
163 | 161 | rates = [r.proportion for r in results] |
|
0 commit comments