本文整理匯總了Python中graphite_api.render.datalib.TimeSeries.color方法的典型用法代碼示例。如果您正苦於以下問題:Python TimeSeries.color方法的具體用法?Python TimeSeries.color怎麽用?Python TimeSeries.color使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類graphite_api.render.datalib.TimeSeries
的用法示例。
在下文中一共展示了TimeSeries.color方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_TimeSeries_equal_list_color
# 需要導入模塊: from graphite_api.render.datalib import TimeSeries [as 別名]
# 或者: from graphite_api.render.datalib.TimeSeries import color [as 別名]
def test_TimeSeries_equal_list_color(self):
values = range(0, 100)
series1 = TimeSeries("collectd.test-db.load.value",
0, len(values), 1, values)
series1.color = 'white'
series2 = TimeSeries("collectd.test-db.load.value",
0, len(values), 1, values)
series2.color = 'white'
self.assertEqual(series1, series2)
示例2: test_TimeSeries_equal_list_color_bad2
# 需要導入模塊: from graphite_api.render.datalib import TimeSeries [as 別名]
# 或者: from graphite_api.render.datalib.TimeSeries import color [as 別名]
def test_TimeSeries_equal_list_color_bad2(self):
values = range(0, 100)
series1 = TimeSeries("collectd.test-db.load.value",
0, len(values), 1, values)
series2 = TimeSeries("collectd.test-db.load.value",
0, len(values), 1, values)
series1.color = 'white'
with self.assertRaises(AssertionError):
self.assertEqual(series1, series2)