Single line test
(self)
| 172 | assert np.array_equal(chart_data(ch, "b")["text"], ["b", "b", "b"]) |
| 173 | |
| 174 | def test_single_datetime_text(self): |
| 175 | """Single line test""" |
| 176 | data = pd.DataFrame( |
| 177 | { |
| 178 | "number": [1, 10, -10, 0], |
| 179 | "datetimes": ["2017-01-01", "2017-01-02", "2017-01-03", "2017-01-04"], |
| 180 | "text": ["a", "b", "a", "b"], |
| 181 | } |
| 182 | ) |
| 183 | ch = chartify.Chart(x_axis_type="datetime") |
| 184 | ch.plot.text(data, x_column="datetimes", y_column="number", text_column="text") |
| 185 | assert np.array_equal(chart_data(ch, "")["datetimes"], pd.date_range("2017-01-01", "2017-01-04")) |
| 186 | assert np.array_equal(chart_data(ch, "")["number"], [1, 10, -10, 0]) |
| 187 | assert np.array_equal(chart_data(ch, "")["text"], ["a", "b", "a", "b"]) |
| 188 | |
| 189 | |
| 190 | class CategoricalTextTest: |
nothing calls this directly
no test coverage detected