def test_duplicate_names_error_in_strict_mode(self):

    def f(x):
        summary.summary(x, name='x')
        summary.summary(x, name='x')
        return x
    with self.assertRaisesRegex(ValueError, 'has already been reaped: x'):
        summary.get_summaries(f)(2.0)
def test_duplicate_names_error_in_strict_mode(self):

    def f(x):
        summary.summary(x, name='x')
        summary.summary(x, name='x')
        return x
    with self.assertRaisesRegex(ValueError, 'has already been reaped: x'):
        summary.get_summaries(f)(2.0)