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
|
Description: Port to Python3.12 and skip one test that has different results in Python 3.11 and 3.12
Bug-Debian: https://bugs.debian.org/1058299
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 25 Dec 2023 08:35:57 +0100
Forwarded: no, project is archived
--- a/influxdb/tests/client_test.py
+++ b/influxdb/tests/client_test.py
@@ -522,7 +522,7 @@
def test_write_points_bad_precision(self):
"""Test write points w/bad precision TestInfluxDBClient object."""
cli = InfluxDBClient()
- with self.assertRaisesRegexp(
+ with self.assertRaisesRegex(
Exception,
"Invalid time precision is given. "
"\(use 'n', 'u', 'ms', 's', 'm' or 'h'\)"
--- a/influxdb/tests/influxdb08/client_test.py
+++ b/influxdb/tests/influxdb08/client_test.py
@@ -279,7 +279,7 @@
'test', use_udp=True, udp_port=4444
)
- with self.assertRaisesRegexp(
+ with self.assertRaisesRegex(
Exception,
"InfluxDB only supports seconds precision for udp writes"
):
@@ -304,7 +304,7 @@
def test_write_points_bad_precision(self):
"""Test write points with bad precision."""
cli = InfluxDBClient()
- with self.assertRaisesRegexp(
+ with self.assertRaisesRegex(
Exception,
"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
):
@@ -448,7 +448,7 @@
def test_query_bad_precision(self):
"""Test query with bad precision for TestInfluxDBClient."""
cli = InfluxDBClient()
- with self.assertRaisesRegexp(
+ with self.assertRaisesRegex(
Exception,
"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
):
@@ -732,7 +732,7 @@
"""Test add database user with bad perms for TestInfluxDBClient."""
cli = InfluxDBClient()
- with self.assertRaisesRegexp(
+ with self.assertRaisesRegex(
Exception,
"'permissions' must be \(readFrom, writeTo\) tuple"
):
--- a/influxdb/tests/helper_test.py
+++ b/influxdb/tests/helper_test.py
@@ -362,6 +362,7 @@
self.assertIn('forced to 1', str(w[-1].message),
'Warning message did not contain "forced to 1".')
+ @unittest.skip("Test produces different number of warnings for Python3.11 and Python3.12 thus not possible to pass for both at the same time")
def testWarnBulkSizeNoEffect(self):
"""Test warning for a set bulk size but autocommit False."""
class WarnBulkSizeNoEffect(SeriesHelper):
|