| Index: tracing/tracing/value/histogram_unittest.py
|
| diff --git a/tracing/tracing/value/histogram_unittest.py b/tracing/tracing/value/histogram_unittest.py
|
| index 07cad7d11fcce1d4ee09bb280e0c3a28969dee18..760cf8639437f429d35380aaeb8b804434b41fb2 100644
|
| --- a/tracing/tracing/value/histogram_unittest.py
|
| +++ b/tracing/tracing/value/histogram_unittest.py
|
| @@ -533,75 +533,6 @@ class HistogramUnittest(unittest.TestCase):
|
| self.assertEqual(3, hist.GetApproximatePercentile(0.9))
|
| self.assertEqual(4, hist.GetApproximatePercentile(1))
|
|
|
| -class OwnershipUnittest(unittest.TestCase):
|
| -
|
| - def testInitRequiresEmailsAsIterable(self):
|
| - with self.assertRaises(TypeError):
|
| - _ = histogram.Ownership(123)
|
| -
|
| - def testInitEmailsDefaultValue(self):
|
| - owner_empty_emails = histogram.Ownership(None)
|
| - self.assertEqual(owner_empty_emails.emails, [])
|
| - self.assertIsNone(owner_empty_emails.component)
|
| -
|
| - def testInitRequiredComponentAsStr(self):
|
| - with self.assertRaises(TypeError):
|
| - _ = histogram.Ownership([], ['foo'])
|
| -
|
| - def testEmails(self):
|
| - ownership = histogram.Ownership([])
|
| - self.assertEqual(ownership.emails, [])
|
| -
|
| - ownership = histogram.Ownership(['alice@chromium.org'])
|
| - self.assertEqual(ownership.emails, ['alice@chromium.org'])
|
| -
|
| - def testComponent(self):
|
| - ownership = histogram.Ownership([])
|
| - self.assertIsNone(ownership.component)
|
| -
|
| - ownership = histogram.Ownership([], 'fooBar')
|
| - self.assertEqual(ownership.component, 'fooBar')
|
| -
|
| - def testFromDict(self):
|
| - sample_emails = ['alice@chromium.org', 'bob@chromium.org']
|
| -
|
| - ownership_dict = {'emails': sample_emails}
|
| - ownership_no_component = histogram.Ownership.FromDict(ownership_dict)
|
| - self.assertEqual(ownership_no_component.emails, sample_emails)
|
| - self.assertIsNone(ownership_no_component.component)
|
| -
|
| - ownership_dict['component'] = 'fooBar'
|
| - ownership_with_component = histogram.Ownership.FromDict(ownership_dict)
|
| - self.assertEqual(ownership_with_component.emails, sample_emails)
|
| - self.assertEqual(ownership_with_component.component, 'fooBar')
|
| -
|
| - def testAsDict(self):
|
| - sample_emails = ['alice@chromium.org']
|
| -
|
| - ownership_no_component = histogram.Ownership(sample_emails)
|
| - ownership_dict_no_component = ownership_no_component.AsDict()
|
| -
|
| - sample_emails.append('bob@chromium.org')
|
| -
|
| - ownership_with_component = histogram.Ownership(sample_emails, 'fooBar')
|
| -
|
| - self.assertEqual(ownership_dict_no_component['emails'],
|
| - ['alice@chromium.org'])
|
| - self.assertNotIn('component', ownership_dict_no_component)
|
| - self.assertEqual(ownership_with_component.AsDict()['component'], 'fooBar')
|
| -
|
| - def testEquality(self):
|
| - ownership0 = histogram.Ownership(['alice@chromium.org'], 'foo')
|
| - ownership1 = histogram.Ownership(['alice@chromium.org'], 'foo')
|
| -
|
| - self.assertEqual(ownership0, ownership1)
|
| -
|
| - def testInequality(self):
|
| - ownership0 = histogram.Ownership(['alice@chromium.org'], 'foo')
|
| - ownership1 = histogram.Ownership(['alice@chromium.org'], 'bar')
|
| -
|
| - self.assertNotEqual(ownership0, ownership1)
|
| -
|
| class BreakdownUnittest(unittest.TestCase):
|
|
|
| def testRoundtrip(self):
|
|
|