File: SyntaxWarning

package info (click to toggle)
influxdb-python 5.3.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,576 kB
  • sloc: python: 7,274; makefile: 5
file content (115 lines) | stat: -rw-r--r-- 4,604 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Description: silence SyntaxWarning
Author: Alexandre Detiste <tchet@debian.org>
Forwarded: no, project is archived

--- a/influxdb/tests/client_test.py
+++ b/influxdb/tests/client_test.py
@@ -524,8 +524,8 @@
         cli = InfluxDBClient()
         with self.assertRaisesRegex(
             Exception,
-            "Invalid time precision is given. "
-            "\(use 'n', 'u', 'ms', 's', 'm' or 'h'\)"
+            r"Invalid time precision is given. "
+            r"\(use 'n', 'u', 'ms', 's', 'm' or 'h'\)"
         ):
             cli.write_points(
                 self.dummy_points,
@@ -1509,9 +1509,9 @@
         cli = InfluxDBClient(username=None, password=None,
                              socket_options=test_socket_options)
 
-        self.assertEquals(cli._session.adapters.get("http://").socket_options,
+        self.assertEqual(cli._session.adapters.get("http://").socket_options,
                           test_socket_options)
-        self.assertEquals(cli._session.adapters.get("http://").poolmanager.
+        self.assertEqual(cli._session.adapters.get("http://").poolmanager.
                           connection_pool_kw.get("socket_options"),
                           test_socket_options)
 
@@ -1519,18 +1519,18 @@
             .connection_from_url(
             url="http://localhost:8086")
         new_connection = connection_pool._new_conn()
-        self.assertEquals(new_connection.socket_options, test_socket_options)
+        self.assertEqual(new_connection.socket_options, test_socket_options)
 
     def test_none_socket_options(self):
         """Test default socket options."""
         cli = InfluxDBClient(username=None, password=None)
-        self.assertEquals(cli._session.adapters.get("http://").socket_options,
+        self.assertEqual(cli._session.adapters.get("http://").socket_options,
                           None)
         connection_pool = cli._session.adapters.get("http://").poolmanager \
             .connection_from_url(
             url="http://localhost:8086")
         new_connection = connection_pool._new_conn()
-        self.assertEquals(new_connection.socket_options,
+        self.assertEqual(new_connection.socket_options,
                           HTTPConnection.default_socket_options)
 
 
--- a/influxdb/tests/influxdb08/client_test.py
+++ b/influxdb/tests/influxdb08/client_test.py
@@ -306,7 +306,7 @@
         cli = InfluxDBClient()
         with self.assertRaisesRegex(
             Exception,
-            "Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
+            r"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
         ):
             cli.write_points(
                 self.dummy_points,
@@ -450,7 +450,7 @@
         cli = InfluxDBClient()
         with self.assertRaisesRegex(
             Exception,
-            "Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
+            r"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
         ):
             cli.query('select column_one from foo', time_precision='g')
 
@@ -734,7 +734,7 @@
 
         with self.assertRaisesRegex(
                 Exception,
-                "'permissions' must be \(readFrom, writeTo\) tuple"
+                r"'permissions' must be \(readFrom, writeTo\) tuple"
         ):
             cli.add_database_user(
                 new_password='paul',
--- a/influxdb/tests/server_tests/client_test_with_server.py
+++ b/influxdb/tests/server_tests/client_test_with_server.py
@@ -879,27 +879,27 @@
         self.cli.write_points(dummy_points)
         self.cli.write_points(dummy_points_2)
 
-        self.assertEquals(
+        self.assertEqual(
             self.cli.get_list_series(),
             ['cpu_load_short,host=server01,region=us-west',
              'memory_usage,host=server02,region=us-east']
         )
 
-        self.assertEquals(
+        self.assertEqual(
             self.cli.get_list_series(measurement='memory_usage'),
             ['memory_usage,host=server02,region=us-east']
         )
 
-        self.assertEquals(
+        self.assertEqual(
             self.cli.get_list_series(measurement='memory_usage'),
             ['memory_usage,host=server02,region=us-east']
         )
 
-        self.assertEquals(
+        self.assertEqual(
             self.cli.get_list_series(tags={'host': 'server02'}),
             ['memory_usage,host=server02,region=us-east'])
 
-        self.assertEquals(
+        self.assertEqual(
             self.cli.get_list_series(
                 measurement='cpu_load_short', tags={'host': 'server02'}),
             [])