#NEWLINE# def test_report_now_plain( self ) : #NEWLINE# #INDENT# r = CarbonReporter ( registry = self . registry , reporting_interval = 1 , clock = self . clock , socket_factory = ( lambda : self ) ) #NEWLINE# self . capture_test_metrics ( ) #NEWLINE# r . report_now ( ) #NEWLINE# test_data = sorted ( self . output . getvalue ( ) . decode ( ) . splitlines ( ) ) #NEWLINE# expected_data = sorted ( [ 'counter-2.count -2 2' , 'c1.count 1 2' , 'gsimple.value 42 2' , 'gcb.value 123 2' , 't1.1m_rate 0 2' , 't1.999_percentile 1 2' , 't1.15m_rate 0 2' , 't1.99_percentile 1 2' , 't1.mean_rate 1.0 2' , 't1.95_percentile 1 2' , 't1.min 1 2' , 't1.50_percentile 1 2' , 't1.5m_rate 0 2' , 't1.count 1.0 2' , 't1.75_percentile 1 2' , 't1.std_dev 0.0 2' , 't1.max 1 2' , 't1.sum 1.0 2' , 't1.avg 1.0 2' , 'hist.count 10.0 2' , 'hist.999_percentile 512 2' , 'hist.99_percentile 512 2' , 'hist.min 1 2' , 'hist.95_percentile 512 2' , 'hist.75_percentile 160.0 2' , ( 'hist.std_dev 164.94851048466947 2' if PY3 else 'hist.std_dev 164.948510485 2' ) , 'hist.max 512 2' , 'hist.avg 102.3 2' , 'm1.count 1.0 2' , 'm1.1m_rate 0 2' , 'm1.15m_rate 0 2' , 'm1.5m_rate 0 2' , 'm1.mean_rate 1.0 2' ] ) #NEWLINE# self . assertEqual ( test_data , expected_data )