Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ui/analytics/analytics_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@ def _update_test_status_distribution(self, data):
total = data.get('total_tests', 0)
passed = data.get('passed', 0)
failed = data.get('failed', 0)
other = max(0, total - passed - failed)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing others because we want tests be just boolean : failed or passed

# other = max(0, total - passed - failed)

if total == 0:
self._show_empty_chart(ax, "No test data available")
self.widget.status_canvas.draw()
return

try:
sizes = [passed, failed, other]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then remove it from the other part of code in order to avoids errors because of this .

labels = [f'Passed ({passed})', f'Failed ({failed})', f'Other ({other})']
colors = ['#2ecc71', '#e74c3c', '#f39c12']
explode = (0.05, 0.05, 0)
sizes = [passed, failed]
labels = [f'Passed ({passed})', f'Failed ({failed})']
colors = ['#2ecc71', '#e74c3c']
explode = (0.05, 0.05)

wedges, _, _ = ax.pie(
sizes, explode=explode, labels=labels, colors=colors,
Expand Down