Debian Codegraph @

debian/patches/SyntaxWarning

raw
1 Description: silence SyntaxWarning
2 Author: Alexandre Detiste <[email protected]>
3 Forwarded: no, project is archived
4
5 --- a/influxdb/tests/client_test.py
6 +++ b/influxdb/tests/client_test.py
7 @@ -524,8 +524,8 @@
8 cli = InfluxDBClient()
9 with self.assertRaisesRegex(
10 Exception,
11 - "Invalid time precision is given. "
12 - "\(use 'n', 'u', 'ms', 's', 'm' or 'h'\)"
13 + r"Invalid time precision is given. "
14 + r"\(use 'n', 'u', 'ms', 's', 'm' or 'h'\)"
15 ):
16 cli.write_points(
17 self.dummy_points,
18 @@ -1509,9 +1509,9 @@
19 cli = InfluxDBClient(username=None, password=None,
20 socket_options=test_socket_options)
21
22 - self.assertEquals(cli._session.adapters.get("http://").socket_options,
23 + self.assertEqual(cli._session.adapters.get("http://").socket_options,
24 test_socket_options)
25 - self.assertEquals(cli._session.adapters.get("http://").poolmanager.
26 + self.assertEqual(cli._session.adapters.get("http://").poolmanager.
27 connection_pool_kw.get("socket_options"),
28 test_socket_options)
29
30 @@ -1519,18 +1519,18 @@
31 .connection_from_url(
32 url="http://localhost:8086")
33 new_connection = connection_pool._new_conn()
34 - self.assertEquals(new_connection.socket_options, test_socket_options)
35 + self.assertEqual(new_connection.socket_options, test_socket_options)
36
37 def test_none_socket_options(self):
38 """Test default socket options."""
39 cli = InfluxDBClient(username=None, password=None)
40 - self.assertEquals(cli._session.adapters.get("http://").socket_options,
41 + self.assertEqual(cli._session.adapters.get("http://").socket_options,
42 None)
43 connection_pool = cli._session.adapters.get("http://").poolmanager \
44 .connection_from_url(
45 url="http://localhost:8086")
46 new_connection = connection_pool._new_conn()
47 - self.assertEquals(new_connection.socket_options,
48 + self.assertEqual(new_connection.socket_options,
49 HTTPConnection.default_socket_options)
50
51
52 --- a/influxdb/tests/influxdb08/client_test.py
53 +++ b/influxdb/tests/influxdb08/client_test.py
54 @@ -306,7 +306,7 @@
55 cli = InfluxDBClient()
56 with self.assertRaisesRegex(
57 Exception,
58 - "Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
59 + r"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
60 ):
61 cli.write_points(
62 self.dummy_points,
63 @@ -450,7 +450,7 @@
64 cli = InfluxDBClient()
65 with self.assertRaisesRegex(
66 Exception,
67 - "Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
68 + r"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
69 ):
70 cli.query('select column_one from foo', time_precision='g')
71
72 @@ -734,7 +734,7 @@
73
74 with self.assertRaisesRegex(
75 Exception,
76 - "'permissions' must be \(readFrom, writeTo\) tuple"
77 + r"'permissions' must be \(readFrom, writeTo\) tuple"
78 ):
79 cli.add_database_user(
80 new_password='paul',
81 --- a/influxdb/tests/server_tests/client_test_with_server.py
82 +++ b/influxdb/tests/server_tests/client_test_with_server.py
83 @@ -879,27 +879,27 @@
84 self.cli.write_points(dummy_points)
85 self.cli.write_points(dummy_points_2)
86
87 - self.assertEquals(
88 + self.assertEqual(
89 self.cli.get_list_series(),
90 ['cpu_load_short,host=server01,region=us-west',
91 'memory_usage,host=server02,region=us-east']
92 )
93
94 - self.assertEquals(
95 + self.assertEqual(
96 self.cli.get_list_series(measurement='memory_usage'),
97 ['memory_usage,host=server02,region=us-east']
98 )
99
100 - self.assertEquals(
101 + self.assertEqual(
102 self.cli.get_list_series(measurement='memory_usage'),
103 ['memory_usage,host=server02,region=us-east']
104 )
105
106 - self.assertEquals(
107 + self.assertEqual(
108 self.cli.get_list_series(tags={'host': 'server02'}),
109 ['memory_usage,host=server02,region=us-east'])
110
111 - self.assertEquals(
112 + self.assertEqual(
113 self.cli.get_list_series(
114 measurement='cpu_load_short', tags={'host': 'server02'}),
115 [])