aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCharts/qcharts_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCharts/qcharts_test.py')
-rw-r--r--sources/pyside6/tests/QtCharts/qcharts_test.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/sources/pyside6/tests/QtCharts/qcharts_test.py b/sources/pyside6/tests/QtCharts/qcharts_test.py
index c3e1ce805..07e33218a 100644
--- a/sources/pyside6/tests/QtCharts/qcharts_test.py
+++ b/sources/pyside6/tests/QtCharts/qcharts_test.py
@@ -44,21 +44,22 @@ from PySide6.QtCore import QRect, QSize, QTimer
from PySide6.QtGui import QGuiApplication, QScreen
from PySide6.QtCharts import QChart, QChartView, QPieSeries
+
class QChartsTestCase(UsesQApplication):
'''Tests related to QCharts'''
def testCharts(self):
self.series = QPieSeries()
- self.series.append("Jane", 1);
- self.series.append("Joe", 2);
- self.series.append("Andy", 3);
- self.series.append("Barbara", 4);
- self.series.append("Axel", 5);
+ self.series.append("Jane", 1)
+ self.series.append("Joe", 2)
+ self.series.append("Andy", 3)
+ self.series.append("Barbara", 4)
+ self.series.append("Axel", 5)
slice = self.series.slices()[1]
- slice.setExploded();
- slice.setLabelVisible();
+ slice.setExploded()
+ slice.setLabelVisible()
self.chart = QChart()
- self.chart.addSeries(self.series);
+ self.chart.addSeries(self.series)
chartView = QChartView(self.chart)
screenSize = QGuiApplication.primaryScreen().geometry().size()
chartView.resize(screenSize / 2)
@@ -66,5 +67,6 @@ class QChartsTestCase(UsesQApplication):
QTimer.singleShot(500, self.app.quit)
self.app.exec_()
+
if __name__ == '__main__':
unittest.main()