def test_can_append_to_growing_list_with_summary(self):

    def f(x):
        summary.summary((x + 1.0), name='x', mode='append')
        summary.summary((x + 2.0), name='x', mode='append')
        return x
    (_, summaries) = summary.get_summaries(f)(2.0)
    self.assertSetEqual(set(summaries.keys()), {'x'})
    np.testing.assert_allclose(summaries['x'], np.array([3.0, 4.0]))
def test_can_append_to_growing_list_with_summary(self):

    def f(x):
        summary.summary((x + 1.0), name='x', mode='append')
        summary.summary((x + 2.0), name='x', mode='append')
        return x
    (_, summaries) = summary.get_summaries(f)(2.0)
    self.assertSetEqual(set(summaries.keys()), {'x'})
    np.testing.assert_allclose(summaries['x'], np.array([3.0, 4.0]))