File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,13 @@ def test_pthread_getcpuclockid(self):
117117 clk_id = time .pthread_getcpuclockid (threading .get_ident ())
118118 self .assertTrue (type (clk_id ) is int )
119119 # when in 32-bit mode AIX only returns the predefined constant
120- if not platform .system () == "AIX" :
121- self .assertNotEqual (clk_id , time .CLOCK_THREAD_CPUTIME_ID )
122- elif (sys .maxsize .bit_length () > 32 ):
123- self .assertNotEqual (clk_id , time .CLOCK_THREAD_CPUTIME_ID )
124- else :
120+ if platform .system () == "AIX" and (sys .maxsize .bit_length () <= 32 ):
125121 self .assertEqual (clk_id , time .CLOCK_THREAD_CPUTIME_ID )
122+ # Solaris returns CLOCK_THREAD_CPUTIME_ID when current thread is given
123+ elif sys .platform .startswith ("sunos" ):
124+ self .assertEqual (clk_id , time .CLOCK_THREAD_CPUTIME_ID )
125+ else :
126+ self .assertNotEqual (clk_id , time .CLOCK_THREAD_CPUTIME_ID )
126127 t1 = time .clock_gettime (clk_id )
127128 t2 = time .clock_gettime (clk_id )
128129 self .assertLessEqual (t1 , t2 )
You can’t perform that action at this time.
0 commit comments