Single line test
(self)
| 85 | assert np.array_equal(chart_data(ch, "b")["number2"], [4, -3, -10]) |
| 86 | |
| 87 | def test_single_datetime_line(self): |
| 88 | """Single line test""" |
| 89 | data = pd.DataFrame( |
| 90 | { |
| 91 | "number": [1, 10, -10, 0], |
| 92 | "datetimes": ["2017-01-01", "2017-01-02", "2017-01-03", "2017-01-04"], |
| 93 | } |
| 94 | ) |
| 95 | ch = chartify.Chart(x_axis_type="datetime") |
| 96 | ch.plot.line(data, x_column="datetimes", y_column="number") |
| 97 | assert np.array_equal(chart_data(ch, "")["datetimes"], pd.date_range("2017-01-01", "2017-01-04")) |
| 98 | assert np.array_equal(chart_data(ch, "")["number"], [1, 10, -10, 0]) |
| 99 | |
| 100 | |
| 101 | class TestScatter: |
nothing calls this directly
no test coverage detected