@@ -2073,8 +2073,9 @@ def parse_output(self, output, expected):
20732073 # Check that no allocation occurs as estimate_memory should avoid data touch
20742074 assert "Allocating" not in output .text
20752075
2076- name , disk , host , device = output .records [- 1 ].message .split ()
2077- extracted = (name , int (disk ), int (host ), int (device ))
2076+ parsed = output .records [- 1 ].message .split ()
2077+ name , host , device = parsed [:3 ]
2078+ extracted = (name , int (host ), int (device ))
20782079
20792080 assert extracted == expected
20802081
@@ -2093,7 +2094,7 @@ def test_basic_usage(self, caplog, shape, dtype, so):
20932094
20942095 # Check output of estimate_memory
20952096 host = reduce (mul , f .shape_allocated )* np .dtype (f .dtype ).itemsize
2096- expected = ("Kernel" , 0 , host , 0 )
2097+ expected = ("Kernel" , host , 0 )
20972098 self .parse_output (caplog , expected )
20982099
20992100 def test_multiple_objects (self , caplog ):
@@ -2107,7 +2108,7 @@ def test_multiple_objects(self, caplog):
21072108
21082109 check = sum (reduce (mul , func .shape_allocated )* np .dtype (func .dtype ).itemsize
21092110 for func in (f , g ))
2110- expected = ("Kernel" , 0 , check , 0 )
2111+ expected = ("Kernel" , check , 0 )
21112112 self .parse_output (caplog , expected )
21122113
21132114 @pytest .mark .parametrize ('time' , [True , False ])
@@ -2126,7 +2127,7 @@ def test_sparse(self, caplog, time):
21262127
21272128 check = sum (reduce (mul , func .shape_allocated )* np .dtype (func .dtype ).itemsize
21282129 for func in (f , src , src .coordinates ))
2129- expected = ("Kernel" , 0 , check , 0 )
2130+ expected = ("Kernel" , check , 0 )
21302131 self .parse_output (caplog , expected )
21312132
21322133 @pytest .mark .parametrize ('save' , [None , Buffer (3 ), 10 ])
@@ -2138,7 +2139,7 @@ def test_timefunction(self, caplog, save):
21382139 op = Operator (Eq (f , 1 ))
21392140 op .estimate_memory (human_readable = False )
21402141 check = reduce (mul , f .shape_allocated )* np .dtype (f .dtype ).itemsize
2141- expected = ("Kernel" , 0 , check , 0 )
2142+ expected = ("Kernel" , check , 0 )
21422143 self .parse_output (caplog , expected )
21432144
21442145 def test_mashup (self , caplog ):
@@ -2162,7 +2163,7 @@ def test_mashup(self, caplog):
21622163 check = sum (reduce (mul , func .shape_allocated )* np .dtype (func .dtype ).itemsize
21632164 for func in (f , g , src0 , src0 .coordinates ,
21642165 src1 , src1 .coordinates ))
2165- expected = ("Kernel" , 0 , check , 0 )
2166+ expected = ("Kernel" , check , 0 )
21662167 self .parse_output (caplog , expected )
21672168
21682169 def test_temp_array (self , caplog ):
@@ -2194,7 +2195,7 @@ def test_temp_array(self, caplog):
21942195 # Factor in the temp array
21952196 check += reduce (mul , b .shape_allocated )* np .dtype (a .dtype ).itemsize
21962197
2197- expected = ("Kernel" , 0 , check , 0 )
2198+ expected = ("Kernel" , check , 0 )
21982199 self .parse_output (caplog , expected )
21992200
22002201 def test_overrides (self , caplog ):
@@ -2226,7 +2227,7 @@ def test_overrides(self, caplog):
22262227 check = sum (reduce (mul , func .shape_allocated )* np .dtype (func .dtype ).itemsize
22272228 for func in (f1 , tf1 , s1 , s1 .coordinates , st1 , st1 .coordinates ))
22282229
2229- expected = ("Kernel" , 0 , check , 0 )
2230+ expected = ("Kernel" , check , 0 )
22302231 self .parse_output (caplog , expected )
22312232
22322233 def test_device (self , caplog ):
@@ -2249,5 +2250,5 @@ def test_device(self, caplog):
22492250 check = reduce (mul , f .shape_allocated )* np .dtype (f .dtype ).itemsize
22502251
22512252 # Matching memory allocated both on host and device for memmap
2252- expected = ("Kernel" , 0 , check , check )
2253+ expected = ("Kernel" , check , check )
22532254 self .parse_output (caplog , expected )
0 commit comments