1111import hist
1212from hist import Hist , axis , storage
1313
14- BHV = tuple (int (x ) for x in bh .__version__ .split ("." )[:2 ])
15-
1614# TODO: specify what error is raised
1715
1816
@@ -205,21 +203,17 @@ def test_general_fill_integer():
205203
206204def test_general_fill_int_cat ():
207205 h = Hist (
208- axis .IntCategory (range (10 ), name = "x" , flow = BHV < ( 1 , 4 ) ),
209- axis .IntCategory (range (10 ), name = "y" , overflow = BHV < ( 1 , 4 ) ),
206+ axis .IntCategory (range (10 ), name = "x" , flow = False ),
207+ axis .IntCategory (range (10 ), name = "y" , overflow = False ),
210208 axis .IntCategory (range (2 ), name = "z" ),
211209 ).fill (
212210 x = [3 , 3 , 3 , 4 , 5 , 5 , 5 ],
213211 y = [3 , 3 , 4 , 4 , 4 , 4 , 4 ],
214212 z = [0 , 0 , 1 , 1 , 1 , 1 , 1 ],
215213 )
216214
217- if BHV < (1 , 4 ):
218- assert h .axes [0 ].traits .overflow
219- assert h .axes [1 ].traits .overflow
220- else :
221- assert not h .axes [0 ].traits .overflow
222- assert not h .axes [1 ].traits .overflow
215+ assert not h .axes [0 ].traits .overflow
216+ assert not h .axes [1 ].traits .overflow
223217 assert h .axes [2 ].traits .overflow
224218
225219 z_one_only = h [{2 : bh .loc (1 )}]
@@ -235,21 +229,17 @@ def test_general_fill_int_cat():
235229
236230def test_general_fill_str_cat ():
237231 h = Hist (
238- axis .StrCategory ("FT" , name = "x" , flow = BHV < ( 1 , 4 ) ),
239- axis .StrCategory (list ("FT" ), name = "y" , overflow = BHV < ( 1 , 4 ) ),
232+ axis .StrCategory ("FT" , name = "x" , flow = False ),
233+ axis .StrCategory (list ("FT" ), name = "y" , overflow = False ),
240234 axis .StrCategory (["F" , "T" ], name = "z" ),
241235 ).fill (
242236 ["T" , "T" , "T" , "T" , "T" , "F" , "T" ],
243237 ["F" , "T" , "T" , "F" , "F" , "T" , "F" ],
244238 ["F" , "F" , "T" , "T" , "T" , "T" , "T" ],
245239 )
246240
247- if BHV < (1 , 4 ):
248- assert h .axes [0 ].traits .overflow
249- assert h .axes [1 ].traits .overflow
250- else :
251- assert not h .axes [0 ].traits .overflow
252- assert not h .axes [1 ].traits .overflow
241+ assert not h .axes [0 ].traits .overflow
242+ assert not h .axes [1 ].traits .overflow
253243 assert h .axes [2 ].traits .overflow
254244
255245 z_one_only = h [{2 : bh .loc ("T" )}]
@@ -307,7 +297,7 @@ def test_general_access():
307297 h = Hist (
308298 axis .Regular (50 , - 5 , 5 , name = "Norm" , label = "normal distribution" ),
309299 axis .Regular (50 , - 5 , 5 , name = "Unif" , label = "uniform distribution" ),
310- axis .StrCategory (["hi" , "hello" ], name = "Greet" , flow = BHV < ( 1 , 4 ) ),
300+ axis .StrCategory (["hi" , "hello" ], name = "Greet" , flow = False ),
311301 axis .Boolean (name = "Yes" ),
312302 axis .Integer (0 , 1000 , name = "Int" ),
313303 ).fill (
0 commit comments