MCPcopy Create free account
hub / github.com/spotify/chartify / test_multi_numeric_text

Method test_multi_numeric_text

tests/test_plots.py:163–172  ·  view source on GitHub ↗

Single line test

(self)

Source from the content-addressed store, hash-verified

161 assert np.array_equal(chart_data(ch, "")["text"], ["a", "a", "a"])
162
163 def test_multi_numeric_text(self):
164 """Single line test"""
165 ch = chartify.Chart()
166 ch.plot.text(self.data, x_column="number1", y_column="number2", text_column="text", color_column="text")
167 assert np.array_equal(chart_data(ch, "a")["number1"], [1.0, 2.0, 3.0])
168 assert np.array_equal(chart_data(ch, "a")["number2"], [5, 10, 0])
169 assert np.array_equal(chart_data(ch, "a")["text"], ["a", "a", "a"])
170 assert np.array_equal(chart_data(ch, "b")["number1"], [1.0, 2.0, 3.0])
171 assert np.array_equal(chart_data(ch, "b")["number2"], [4, -3, -10])
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"""

Callers

nothing calls this directly

Calls 2

chart_dataFunction · 0.85
textMethod · 0.45

Tested by

no test coverage detected