Skip to content

Commit

Permalink
Update the exception message for missing abstract method
Browse files Browse the repository at this point in the history
  • Loading branch information
foarsitter committed Nov 21, 2023
1 parent db3f17e commit 35f8508
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def test_installed_apps_not_subclass_of_base(self):
)
def test_installed_apps_no_resolve_conflicts_function(self):
exception_msg = "Can't instantiate abstract class CRNoFunction with abstract methods resolve_collisions"
if sys.version_info[:2] >= (3, 9):

if sys.version_info[:2] >= (3, 12):
exception_msg = "Can't instantiate abstract class CRNoFunction without an implementation for abstract method 'resolve_collisions'"
elif sys.version_info[:2] >= (3, 9):
exception_msg = exception_msg.replace('methods', 'method')
with self.assertRaisesRegex(TypeError, exception_msg):
self._assert_models_present_under_names(
Expand Down

0 comments on commit 35f8508

Please sign in to comment.