__init__.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # testing/__init__.py
  2. # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
  3. # <see AUTHORS file>
  4. #
  5. # This module is part of SQLAlchemy and is released under
  6. # the MIT License: https://www.opensource.org/licenses/mit-license.php
  7. from . import config
  8. from . import mock
  9. from .assertions import assert_raises
  10. from .assertions import assert_raises_context_ok
  11. from .assertions import assert_raises_message
  12. from .assertions import assert_raises_message_context_ok
  13. from .assertions import AssertsCompiledSQL
  14. from .assertions import AssertsExecutionResults
  15. from .assertions import ComparesTables
  16. from .assertions import emits_warning
  17. from .assertions import emits_warning_on
  18. from .assertions import eq_
  19. from .assertions import eq_ignore_whitespace
  20. from .assertions import eq_regex
  21. from .assertions import expect_deprecated
  22. from .assertions import expect_deprecated_20
  23. from .assertions import expect_raises
  24. from .assertions import expect_raises_message
  25. from .assertions import expect_warnings
  26. from .assertions import in_
  27. from .assertions import is_
  28. from .assertions import is_false
  29. from .assertions import is_instance_of
  30. from .assertions import is_none
  31. from .assertions import is_not
  32. from .assertions import is_not_
  33. from .assertions import is_not_none
  34. from .assertions import is_true
  35. from .assertions import le_
  36. from .assertions import ne_
  37. from .assertions import not_in
  38. from .assertions import not_in_
  39. from .assertions import startswith_
  40. from .assertions import uses_deprecated
  41. from .config import async_test
  42. from .config import combinations
  43. from .config import combinations_list
  44. from .config import db
  45. from .config import fixture
  46. from .config import requirements as requires
  47. from .exclusions import _is_excluded
  48. from .exclusions import _server_version
  49. from .exclusions import against as _against
  50. from .exclusions import db_spec
  51. from .exclusions import exclude
  52. from .exclusions import fails
  53. from .exclusions import fails_if
  54. from .exclusions import fails_on
  55. from .exclusions import fails_on_everything_except
  56. from .exclusions import future
  57. from .exclusions import only_if
  58. from .exclusions import only_on
  59. from .exclusions import skip
  60. from .exclusions import skip_if
  61. from .schema import eq_clause_element
  62. from .schema import eq_type_affinity
  63. from .util import adict
  64. from .util import fail
  65. from .util import flag_combinations
  66. from .util import force_drop_names
  67. from .util import lambda_combinations
  68. from .util import metadata_fixture
  69. from .util import provide_metadata
  70. from .util import resolve_lambda
  71. from .util import rowset
  72. from .util import run_as_contextmanager
  73. from .util import teardown_events
  74. from .warnings import assert_warnings
  75. from .warnings import warn_test_suite
  76. def against(*queries):
  77. return _against(config._current, *queries)
  78. crashes = skip