Example #1
0
 def test_nan_data_point(self):
     # Needs to be cast to python int
     result = highcharts._format_data_point(np.nan)
     self.assertIsNone(result)
Example #2
0
 def test_int64_data_point(self):
     # Needs to be cast to python int
     result = highcharts._format_data_point(np.int64(1))
     self.assertEqual(int(1), result)
Example #3
0
 def test_datetime_data_point(self):
     # Needs to be converted to milliseconds
     result = highcharts._format_data_point(pd.Timestamp(date(2000, 1, 1)))
     self.assertEqual(946684800000, result)
Example #4
0
 def test_str_data_point(self):
     result = highcharts._format_data_point('abc')
     self.assertEqual('abc', result)