blob: 82ad19889556e59ab5fd5cc4c63a90261b961926 (
plain)
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
|
From ec9ce743a0f51076d7ea2485a6fa58b72ec8e338 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 4 Aug 2023 10:58:08 -0400
Subject: [PATCH] Replace assertRegexpMatches() with assertRegex()
This alias was deprecated in Python 3.2 and is removed in Python 3.12.
Reference: https://docs.python.org/3.12/whatsnew/3.12.html
---
tests/test_postgresql.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
index 1fa1116..b2bba20 100644
--- a/tests/test_postgresql.py
+++ b/tests/test_postgresql.py
@@ -28,7 +28,7 @@ def test_basic(self):
# connect to postgresql (w/ psycopg2)
conn = psycopg2.connect(**pgsql.dsn())
self.assertIsNotNone(conn)
- self.assertRegexpMatches(pgsql.read_bootlog(), 'is ready to accept connections')
+ self.assertRegex(pgsql.read_bootlog(), 'is ready to accept connections')
conn.close()
# connect to postgresql (w/ sqlalchemy)
@@ -38,7 +38,7 @@ def test_basic(self):
# connect to postgresql (w/ pg8000)
conn = pg8000.connect(**pgsql.dsn())
self.assertIsNotNone(conn)
- self.assertRegexpMatches(pgsql.read_bootlog(), 'is ready to accept connections')
+ self.assertRegex(pgsql.read_bootlog(), 'is ready to accept connections')
conn.close()
finally:
# shutting down
|