File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,11 @@ static PyObject*
4949test_pytime_monotonic (PyObject * Py_UNUSED (self ), PyObject * Py_UNUSED (args ))
5050{
5151 PyTime_t t ;
52- if (PyTime_Monotonic (& t ) < 0 ) {
52+ int res = PyTime_Monotonic (& t );
53+ if (res < 0 ) {
5354 return NULL ;
5455 }
56+ assert (res == 0 );
5557 return pytime_as_float (t );
5658}
5759
@@ -60,9 +62,11 @@ static PyObject*
6062test_pytime_perf_counter (PyObject * Py_UNUSED (self ), PyObject * Py_UNUSED (args ))
6163{
6264 PyTime_t t ;
63- if (PyTime_PerfCounter (& t ) < 0 ) {
65+ int res = PyTime_PerfCounter (& t );
66+ if (res < 0 ) {
6467 return NULL ;
6568 }
69+ assert (res == 0 );
6670 return pytime_as_float (t );
6771}
6872
@@ -71,10 +75,11 @@ static PyObject*
7175test_pytime_time (PyObject * Py_UNUSED (self ), PyObject * Py_UNUSED (args ))
7276{
7377 PyTime_t t ;
74- if ( PyTime_Time (& t ) < 0 ) {
75- printf ( "ERR! %d\n" , ( int ) t );
78+ int res = PyTime_Time (& t );
79+ if ( res < 0 ) {
7680 return NULL ;
7781 }
82+ assert (res == 0 );
7883 return pytime_as_float (t );
7984}
8085
You can’t perform that action at this time.
0 commit comments