| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Fixes: #5223
Change-Id: I0952e54ed9af2952ea340be1945311376ffc1ad2
|
| |
|
|
|
|
|
| |
pytest has removed support for pytest.Class().collect()
and we need to use from_parent.
Change-Id: Ia5fed9b22e76c99f71489283acee207f996f52a4
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added the :class:`_schema.Identity` construct that can be used to
configure identity columns rendered with GENERATED { ALWAYS |
BY DEFAULT } AS IDENTITY. Currently the supported backends are
PostgreSQL >= 10, Oracle >= 12 and MSSQL (with different syntax
and a subset of functionalities).
Fixes: #5362
Fixes: #5324
Fixes: #5360
Change-Id: Iecea6f3ceb36821e8b96f0b61049b580507a1875
|
| |
|
|
|
|
|
|
|
| |
With version 2.0.0 they removed the old terminology, which
I had no idea had been changed in any case for several years.
pushing this out for all branches
Change-Id: I51e4f577aeb9ef8205348b50489549f77072a613
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the approach introduced at
https://gist.github.com/zzzeek/6287e28054d3baddc07fa21a7227904e
We can now create asyncio endpoints that are then handled
in "implicit IO" form within the majority of the Core internals.
Then coroutines are re-exposed at the point at which we call
into asyncpg methods.
Patch includes:
* asyncpg dialect
* asyncio package
* engine, result, ORM session classes
* new test fixtures, tests
* some work with pep-484 and a short plugin for the
pyannotate package, which seems to have so-so results
Change-Id: Idbcc0eff72c4cad572914acdd6f40ddb1aef1a7d
Fixes: #3414
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Note the PR has a few remaining doc linking issues
listed in the comment that must be addressed separately.
Signed-off-by: aplatkouski <5857672+aplatkouski@users.noreply.github.com>
Closes: #5371
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5371
Pull-request-sha: 7e7d233cf3a0c66980c27db0fcdb3c7d93bc2510
Change-Id: I9c36e8d8804483950db4b42c38ee456e384c59e3
|
| |
|
|
| |
Change-Id: I431e1ef41e26d490343204a75a5c097768749768
|
| |
|
|
|
|
|
|
|
| |
py.test 5.4.0 emits deprecation warnings for pytest.Class.
make sure we don't raise for these, and log the code that will
be used for 5.4.0 when we bump requirements.
Fixes: #5201
Change-Id: I83e0402c4a6b2365a63b58d052c6989df3a37328
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The technique arrived at for doing exclusions inside of combinations
relies upon comparing all the arguments in a particular combination
to some set of combinations that were gathered as having
"exclusions". This logic is actually broken for the
case where the @testing.combinations has an "id", but if we fix
that, we still have the issue of all the arguments being
compared, which is complicated and also doesn't work for the
case of a py2/py3 incompatibility like a timezone that has
fractional minutes or seconds in it. It's also not clear
if a @testing.combinations that uses lambdas will work either
(maybe it does though because lambdax == lambdax compares...).
anyway, this patch reworks it so that we hit this on the decorator
side instead, where we add our own decorator and go through
the extra effort to create a decorator that accepts an extra
argument of "exclusions" which we can then check in a way that
is local to the whole pytest @combinations thing in the first place.
The only difficulty is that pytest is very sneaky about looking
at the test function so we need to make sure __wrapped__ isn't
set when doing this.
Change-Id: Ic57aae15b378e0f4ed009e4e82ae7ba73fb6dfc5
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As the ORM's combinatoric tests mostly use entities and
table metadata that's defined in fixtures, we can't use
@testing.combinations directly as it takes place at the
module level. Instead we use lambdas, but to reduce
verbosity we use a code replacement so that the namespace
of the lambda can be provided at runtime rather than
module import time.
Change-Id: Ia63a510f9c1d08b055eef62cf047f1f427f0450c
|
| |
|
|
|
|
|
|
|
|
| |
- ensure we escape out percent signs when a CompiledSQL or RegexSQL
has percent signs in the SQL or in the parameter repr
- to support combinations, print out complete test name in skip
messages, py.test environment gives us a way to do this
Change-Id: Ia9e62f7c1026c1465986144c5757e35fc164a2b8
|
| |
|
|
|
|
|
|
|
|
|
| |
Like py.test we need to be able to mark certain combination
elements with exclusion rules. Add additional logic
to pytestlplugin and exclusions so that the exclusion decorators
can be added to the combination tuples, where they will be applied
to the decorated function along with a qualifier that the test
arguments need to match what's given.
Change-Id: I15d2839954d77a252bab5aaf6e3fd9f388c99dd5
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dialect tests tend to have a lot of lists of types,
SQL constructs etc, convert as many of these to @combinations
as possible.
This is exposing that we don't have per-combination
exclusion rules set up which is making things a little bit
cumbersome.
Also set up a fixture that does metadata + DDL.
Change-Id: Ief820e48c9202982b0b1e181b87862490cd7b0c3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add factilities to implement pytest.mark.parametrize and
pytest.fixtures patterns, which largely resemble things we are
already doing.
Ensure a facade is used, so that the test suite remains independent
of py.test, but also tailors the functions to the more limited
scope in which we are using them.
Additionally, create a class-based version that works from the
same facade.
Several old polymorphic tests as well as two of the sql test
are refactored to use the new features.
Change-Id: I6ef8af1dafff92534313016944d447f9439856cf
References: #4896
|
| |
|
|
|
|
|
|
|
| |
this seems to be the best place to put this as it is guaranteed
before the module is imported. this is for the benefit of
3rd party dialects that also would have this in their conftest.py,
so that they don't have to do the "bootstrap" loading hack.
Change-Id: Ieae5324240e04a7919df46f4fca03f8db7a2af81
|
| |
|
|
|
|
|
|
| |
Since our various eq_(), ne_() etc. functions use assert, pytest
can rewrite this module using its enhanced string reporting.
very helpful for comparing SQL strings
Change-Id: Ia71328401fd7965bcb14eb1ccea0dc48a8f2c3ea
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a very useful assertion which prevents unused variables
from being set up allows code to be more readable and sometimes
even more efficient. test suites seem to be where the most
problems are and there do not seem to be documentation examples
that are using this, or at least the linter is not taking effect
within rst blocks.
Change-Id: I2b3341d8dd14da34879d8425838e66a4b9f8e27d
|
| |
|
|
|
|
|
|
|
| |
We have a custom test collection hook that did not take
node of the actual list of functions in items. By looking
in this list we now support the class/function arguments
passed to the py.test command line.
Change-Id: I1238c7c5796a296037ab9ef3bedf0f619a730481
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Applied on top of a pure run of black -l 79 in
I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes
resolves all remaining flake8 conditions for those codes
we have enabled in setup.cfg.
Included are resolutions for all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a straight reformat run using black as is, with no edits
applied at all.
The black run will format code consistently, however in
some cases that are prevalent in SQLAlchemy code it produces
too-long lines. The too-long lines will be resolved in the
following commit that will resolve all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
|
| |
|
|
|
| |
Change-Id: I69e39d2368f50b126c369ecc35e01799fd013254
(cherry picked from commit 3fc6f32ddc5fbbf439acff42c2fdae9e910154be)
|
| |
|
|
|
|
| |
supporting custom dburi etc.
Change-Id: Ic0ab0b3b4223e40fd335ee3313fda4dfce942100
|
| |
|
|
|
|
| |
run to prevent race conditions against concurrent runs
Change-Id: I065d1cec346ea7af03792c3cc2f30766f73c2bd3
|
| | |
|
| |
|
|
| |
per server
|
| |
|
|
|
|
|
| |
function patched onto config. nose/pytest backends now fill
in their exception class here only when loaded
- use more public seeming api to get at py.test Skipped
exception
|
| |
|
|
| |
test suite redefining an existing test in test_suite
|
| |
|
|
|
|
|
|
| |
- reestablish the "bootstrap" system of loading the test runners
in testing/plugin; using the updated approach we just came up with for
alembic. Coverage should be fixed now when running either py.test or
nose. fixes #3196
- upgrade tox.ini and start using a .coveragerc file
|
| |
|
|
| |
- guard against some potential pytest snarkiness
|
| |
|
|
| |
are a little more crazy under xdist mode
|
| |
|
|
| |
simplify tox again now that we can exclude tests more easily
|
| | |
|
| | |
|
| |
|
|
| |
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
|
| |
|
|
|
| |
- move the logic to determine "test id" into plugin_base
- update callcounts
|
| | |
|
| |
|
|
|
|
| |
number of tests.
- move out logging tests from test_execute to test_logging
|
| | |
|
|
|
is currently being supported in addition to nose, and will likely
be preferred to nose going forward. The nose plugin system used
by SQLAlchemy has been split out so that it works under pytest as
well. There are no plans to drop support for nose at the moment
and we hope that the test suite itself can continue to remain as
agnostic of testing platform as possible. See the file
README.unittests.rst for updated information on running tests
with pytest.
The test plugin system has also been enhanced to support running
tests against mutiple database URLs at once, by specifying the ``--db``
and/or ``--dburi`` flags multiple times. This does not run the entire test
suite for each database, but instead allows test cases that are specific
to certain backends make use of that backend as the test is run.
When using pytest as the test runner, the system will also run
specific test suites multiple times, once for each database, particularly
those tests within the "dialect suite". The plan is that the enhanced
system will also be used by Alembic, and allow Alembic to run
migration operation tests against multiple backends in one run, including
third-party backends not included within Alembic itself.
Third party dialects and extensions are also encouraged to standardize
on SQLAlchemy's test suite as a basis; see the file README.dialects.rst
for background on building out from SQLAlchemy's test platform.
|