mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 14:56:53 +02:00
80 lines
3.1 KiB
Diff
80 lines
3.1 KiB
Diff
This replaces assertRaisesRegexp with assertRaisesRegex for compatibility with
|
|
python >= 3.12.
|
|
diff --color -rupN a/simplesat/constraints/tests/test_package_parser.py b/simplesat/constraints/tests/test_package_parser.py
|
|
--- a/simplesat/constraints/tests/test_package_parser.py 2019-10-08 14:40:38.000000000 +0200
|
|
+++ b/simplesat/constraints/tests/test_package_parser.py 2024-07-04 15:35:07.408091882 +0200
|
|
@@ -22,7 +22,7 @@ class TestPrettyPackageStringParser(unit
|
|
r_message = "Invalid preamble: "
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
# Given
|
|
@@ -30,7 +30,7 @@ class TestPrettyPackageStringParser(unit
|
|
r_message = "Invalid preamble: 'numpy'"
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
# Given
|
|
@@ -38,7 +38,7 @@ class TestPrettyPackageStringParser(unit
|
|
r_message = ("Invalid preamble: ")
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
# Given
|
|
@@ -46,7 +46,7 @@ class TestPrettyPackageStringParser(unit
|
|
r_message = ("Invalid preamble: ")
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
# Given
|
|
@@ -54,7 +54,7 @@ class TestPrettyPackageStringParser(unit
|
|
r_message = ("Invalid preamble: ")
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
# Given
|
|
@@ -63,7 +63,7 @@ class TestPrettyPackageStringParser(unit
|
|
"Unknown constraint kind: 'disparages'")
|
|
|
|
# When
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
def test_depends_simple(self):
|
|
@@ -216,7 +216,7 @@ class TestPrettyPackageStringParser(unit
|
|
"Unknown constraint kind: 'conflits'")
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(ValueError, r_message):
|
|
+ with self.assertRaisesRegex(ValueError, r_message):
|
|
parse(package_string)
|
|
|
|
# Given
|
|
diff --color -rupN a/simplesat/tests/test_pool.py b/simplesat/tests/test_pool.py
|
|
--- a/simplesat/tests/test_pool.py 2019-10-08 14:40:38.000000000 +0200
|
|
+++ b/simplesat/tests/test_pool.py 2024-07-04 15:35:07.411425195 +0200
|
|
@@ -166,7 +166,7 @@ class TestPool(unittest.TestCase):
|
|
constraint_re = re.escape(constraint)
|
|
|
|
# Then
|
|
- with self.assertRaisesRegexp(InvalidConstraint, constraint_re):
|
|
+ with self.assertRaisesRegex(InvalidConstraint, constraint_re):
|
|
Pool([repository])
|
|
|
|
def test_accept_anyversion_constraint_on_provides_metadata(self):
|