11"""Test QtCore."""
22
33import sys
4- from datetime import datetime
4+ from datetime import date , datetime , time
55
66import pytest
77
@@ -31,6 +31,7 @@ def test_QDateTime_toPython_and_toPyDateTime(method):
3131 """Test `QDateTime.toPython` and `QDateTime.toPyDateTime`"""
3232 q_datetime = QtCore .QDateTime (NOW )
3333 py_datetime = getattr (q_datetime , method )()
34+ assert isinstance (py_datetime , datetime )
3435 assert py_datetime == NOW
3536
3637
@@ -39,6 +40,7 @@ def test_QDate_toPython_and_toPyDate(method):
3940 """Test `QDate.toPython` and `QDate.toPyDate`"""
4041 q_date = QtCore .QDateTime (NOW ).date ()
4142 py_date = getattr (q_date , method )()
43+ assert isinstance (py_date , date )
4244 assert py_date == NOW .date ()
4345
4446
@@ -47,6 +49,7 @@ def test_QTime_toPython_and_toPyTime(method):
4749 """Test `QTime.toPython` and `QTime.toPyTime`"""
4850 q_time = QtCore .QDateTime (NOW ).time ()
4951 py_time = getattr (q_time , method )()
52+ assert isinstance (py_time , time )
5053 assert py_time == NOW .time ()
5154
5255
0 commit comments