diff --git a/debian/changelog b/debian/changelog index e718aaa94d5d38a138817afbddd06271dc05582d..b23ced7cb5da344cace9631741d9cf9f9b75137b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ influxdb-python (5.3.1-1) experimental; urgency=medium * Team upload. * Add python3-msgpack as (build-)depends. * Refreshed skip-precision-test.patch. + * Add remove-broken-test.patch. -- Thomas Goirand <zigo@debian.org> Tue, 23 Mar 2021 09:54:46 +0100 diff --git a/debian/patches/remove-broken-test.patch b/debian/patches/remove-broken-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..519cdaf41b18857c23af769760b3610c2428898a --- /dev/null +++ b/debian/patches/remove-broken-test.patch @@ -0,0 +1,47 @@ +Description: Remove broken test + This test is broken because of a deprecation warning in pandas. +Author: Thomas Goirand <zigo@debian.org> +Forwarded: no +Last-Update: 2021-03-23 + +--- influxdb-python-5.3.1.orig/influxdb/tests/dataframe_client_test.py ++++ influxdb-python-5.3.1/influxdb/tests/dataframe_client_test.py +@@ -1210,38 +1210,6 @@ class TestDataFrameClient(unittest.TestC + tag_columns=['tag_one', 'tag_two']) + self.assertEqual(m.last_request.body, expected) + +- def test_write_points_from_dataframe_with_tags_and_nan_json(self): +- """Test write points from json with NaN lines and tags.""" +- now = pd.Timestamp('1970-01-01 00:00+00:00') +- dataframe = pd.DataFrame(data=[['blue', 1, "1", 1, np.inf], +- ['red', 0, "2", 2, np.nan]], +- index=[now, now + timedelta(hours=1)], +- columns=["tag_one", "tag_two", "column_one", +- "column_two", "column_three"]) +- expected = ( +- b"foo,tag_one=blue,tag_two=1 " +- b"column_one=\"1\",column_two=1i " +- b"0\n" +- b"foo,tag_one=red,tag_two=0 " +- b"column_one=\"2\",column_two=2i " +- b"3600000000000\n" +- ) +- +- with requests_mock.Mocker() as m: +- m.register_uri(requests_mock.POST, +- "http://localhost:8086/write", +- status_code=204) +- +- cli = DataFrameClient(database='db') +- +- cli.write_points(dataframe, 'foo', protocol='json', +- tag_columns=['tag_one', 'tag_two']) +- self.assertEqual(m.last_request.body, expected) +- +- cli.write_points(dataframe, 'foo', tags=None, protocol='json', +- tag_columns=['tag_one', 'tag_two']) +- self.assertEqual(m.last_request.body, expected) +- + def test_query_custom_index(self): + """Test query with custom indexes.""" + data = { diff --git a/debian/patches/series b/debian/patches/series index 2e8e31b1d572153b48d5e4184de4776c2cd0dea1..74d98b8899eda1213ca0f345f67c5fc89348a041 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ skip-precision-test.patch +remove-broken-test.patch