This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# testing/assertions.py
|
||||
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
|
||||
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
|
||||
# <see AUTHORS file>
|
||||
#
|
||||
# This module is part of SQLAlchemy and is released under
|
||||
@@ -274,8 +274,8 @@ def int_within_variance(expected, received, variance):
|
||||
)
|
||||
|
||||
|
||||
def eq_regex(a, b, msg=None):
|
||||
assert re.match(b, a), msg or "%r !~ %r" % (a, b)
|
||||
def eq_regex(a, b, msg=None, flags=0):
|
||||
assert re.match(b, a, flags), msg or "%r !~ %r" % (a, b)
|
||||
|
||||
|
||||
def eq_(a, b, msg=None):
|
||||
@@ -513,6 +513,7 @@ class AssertsCompiledSQL:
|
||||
use_default_dialect=False,
|
||||
allow_dialect_select=False,
|
||||
supports_default_values=True,
|
||||
supports_native_boolean=False,
|
||||
supports_default_metavalue=True,
|
||||
literal_binds=False,
|
||||
render_postcompile=False,
|
||||
@@ -527,6 +528,7 @@ class AssertsCompiledSQL:
|
||||
dialect = default.DefaultDialect()
|
||||
dialect.supports_default_values = supports_default_values
|
||||
dialect.supports_default_metavalue = supports_default_metavalue
|
||||
dialect.supports_native_boolean = supports_native_boolean
|
||||
elif allow_dialect_select:
|
||||
dialect = None
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user