Commit Graph

37 Commits

Author SHA1 Message Date
Mike Bayer c19fa8bdb4 Limit non-backend critical profiling tests to SQLite
issues with backend-specific profiling should be limited
to tests that are explcitly against resultset, compiler, etc.

MySQL in particular has an often varying callcount that isn't
worth running these tests against nor is it worth profiling
them for other backends like Oracle and SQL Server.

Also add the REQUIRE_SQLALCHEMY_CEXT flag to
the regen_callcounts.tox.ini script, which is part of some review
somewhere but is needed here to generate callcounts correctly.

Add a "warmup" phase for some of the ORM tests for join conditions
that have varying profile counts based on whether mappings have been
used already or not; profiling should always be against the
"warmed up" version of a function.

Change-Id: If483820235fa4cc4360cbd067a9b68d83512d587
(cherry picked from commit 386012597b)
2020-02-17 15:46:00 -05:00
Mike Bayer 4c2c2c40fd Add deprecation warnings to all deprecated APIs
A large change throughout the library has ensured that all objects, parameters,
and behaviors which have been noted as deprecated or legacy now emit
``DeprecationWarning`` warnings when invoked.   As the Python 3 interpreter now
defaults to displaying deprecation warnings, as well as that modern test suites
based on tools like tox and pytest tend to display deprecation warnings,
this change should make it easier to note what API features are obsolete.

See the notes added to the changelog and migration notes for further
details.

Fixes: #4393
Change-Id: If0ea11a1fc24f9a8029352eeadfc49a7a54c0a1b
2019-01-23 18:10:06 -05:00
Mike Bayer 1e278de4cc Post black reformatting
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
2019-01-06 18:23:11 -05:00
Mike Bayer 1e1a38e780 Run black -l 79 against all source files
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
2019-01-06 17:34:50 +00:00
Mike Bayer 1fc440393a - fully flake8 test/aaa_profiling 2014-07-09 18:59:16 -04:00
Alex Gaynor 1caa7fafbd Fix many typos throughout the codebase
Found using: https://github.com/intgr/topy
2014-04-26 13:13:13 -07:00
Mike Bayer 20cdc64588 trying different approaches to test layout. in this one, the testing modules
become an externally usable package but still remains within the main sqlalchemy parent package.
in this system, we use kind of an ugly hack to get the noseplugin imported outside of the
"sqlalchemy" package, while still making it available within sqlalchemy for usage by
third party libraries.
2012-09-27 02:37:33 -04:00
Mike Bayer 48c9993b65 OK! let's turn this around completely. Forget making a single count across
all platforms.  let's instead store callcounts for *all* observed platforms in a datafile.
Will try to get enough platforms in the file for jenkins to have meaningful results.
for platforms not in the file, it's just skiptest.
2012-08-11 15:51:08 -04:00
Mike Bayer 92ceb399c9 - make sure event mechanics have completed before running this test, lower callcount 2012-08-09 17:38:59 -04:00
Mike Bayer 4e54072397 more adjustments 2012-08-09 16:43:46 -04:00
Mike Bayer 442237afaa - a new approach to profiling where we attempt to strip out
parts of the pstats that are idiosyncratic to different platforms.
the goal is no per-version assertions on tests, version differences
in theory would go into the list of profiling exceptions.
2012-08-09 16:08:48 -04:00
Mike Bayer 27913554a8 trailing whitespace bonanza 2012-07-28 15:50:05 -04:00
Mike Bayer 467f7c1e02 - somehting is making this test have an inconsistent callcount 2012-06-24 02:07:43 -04:00
Mike Bayer 04e6faa2d9 callcounts, due to the DummyLock cleanup 2012-06-23 11:46:47 -04:00
Mike Bayer bc15fb6066 a likely callcount 2012-06-21 01:50:59 -04:00
Mike Bayer e4efa7f5d0 callcount 2012-06-20 19:39:35 -04:00
Mike Bayer 46ee78431c mark all aaa_profiling tests with __requires__ = 'cpython', 2011-04-23 12:34:38 -07:00
Mike Bayer 898e347143 - callcounts
- clean out pool._refs in the test_pool perf tests, make things simple
2011-04-08 16:21:09 -04:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 15297eb4fb callcounts... 2010-12-05 17:47:09 -05:00
Mike Bayer 1c16f373d9 callcounts for 2.4, 2.5, 2.6 2010-12-05 16:39:15 -05:00
Mike Bayer dd2b208d86 - fix callcount for 2.6 2010-12-05 16:09:53 -05:00
Mike Bayer 49145a6940 - more inlining. nominal execution on sqlite down to 36 calls, from 51 in 0.6. 2010-12-05 12:09:06 -05:00
Mike Bayer 58b2939433 - sqlalchemy.test and nose plugin moves back to being entirely
outside of "sqlalchemy" and under "test/".

Rationale:

- coverage plugin works without issue, without need for an awkward
additional package install
- command line for "nosetests" isn't polluted with SQLAlchemy options

[ticket:1949]
2010-11-28 14:19:44 -05:00
Mike Bayer 61c76f92df - repair remaining tests 2010-11-20 11:35:16 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer 9cbfe389f7 - pretty much all tests passing, maybe some callcounts are off
- test suite adjusted to use engine/pool events and not listeners
- deprecation warnings
2010-07-25 13:08:39 -04:00
Mike Bayer 43dbfccf4d up the variance on these as the call counts are very low and
things wiggle around even between 2.6.4/2.6.5
2010-07-06 17:09:42 -04:00
Mike Bayer a9f2ed7b46 - latest distribute
- added caveats to unittest README encountered with Py2.7 + current nose 0.11.3
- call counts for py2.7.   all tests pass for sqlite + mysql-python + psycopg2
2010-07-05 19:54:46 -04:00
Mike Bayer fbe6772d44 more bumps 2010-03-01 00:25:50 +00:00
Mike Bayer 6ec5b489c6 callcounts 2010-02-28 20:46:06 +00:00
Mike Bayer ba015e62cc - orm: Removed a lot of logging that nobody really cares about,
logging that remains will respond to live changes in the
log level.  No significant overhead is added.  [ticket:1719]
- engine: Opened up logging a bit such that isEnabledFor() is called
more often, so that changes to the log level for engine/pool
will be reflected on next connect.   This adds a small
amount of method call overhead.  It's negligible and will make
life a lot easier for all those situations when logging
just happens to be configured after create_engine() is called.
[ticket:1719]
2010-02-28 17:43:10 +00:00
Mike Bayer e7241263aa python3k fixes 2009-08-09 20:50:46 +00:00
Mike Bayer 328e2647be fix some profiles for 2.4 2009-08-06 22:37:38 +00:00
Mike Bayer 8fc5005dfe merge 0.6 series to trunk. 2009-08-06 21:11:27 +00:00
Mike Bayer 45cec095b4 - unit tests have been migrated from unittest to nose.
See README.unittests for information on how to run
the tests.  [ticket:970]
2009-06-10 21:18:24 +00:00