File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,30 @@ def test_insert_draw(self):
271
271
numpy .testing .assert_array_equal (v3 , draw ["v3" ])
272
272
pass
273
273
274
+ @pytest .mark .xfail (
275
+ reason = "Batch inserting assumes identical dict composition every time. See #74."
276
+ )
277
+ def test_insert_flaky_stats (self ):
278
+ """Tries to append stats that only sometimes have an entry for a stat."""
279
+ run , chains = fully_initialized (
280
+ self .backend ,
281
+ RunMeta (
282
+ sample_stats = [
283
+ Variable ("always" , "int8" ),
284
+ Variable ("sometimes" , "bool" ),
285
+ ]
286
+ ),
287
+ )
288
+
289
+ chain = chains [0 ]
290
+ chain .append ({}, dict (always = 1 , sometimes = True ))
291
+ chain .append ({}, dict (always = 2 ))
292
+ chain ._commit ()
293
+
294
+ tuple (chain .get_stats ("always" )) == (1 , 2 )
295
+ assert tuple (chain .get_stats ("sometimes" )) == (True , None )
296
+ pass
297
+
274
298
def test_get_row_at (self ):
275
299
run , chains = fully_initialized (
276
300
self .backend ,
You can’t perform that action at this time.
0 commit comments