Commit Graph

68 Commits

Author SHA1 Message Date
Khairi Hafsham 772374735d Make all tests to be PEP8 compliant
tested using pycodestyle version 2.2.0

Fixes: #3885
Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
2017-02-07 11:21:56 -05:00
Eric Streeper 45876612d2 PEP8 cleanup in /test/aaa_profiling 2015-03-18 22:56:18 -07:00
Mike Bayer 51c7005dc5 - clean up zoomark a little and try to get new profiles written 2014-08-30 00:11:32 -04:00
Mike Bayer b577afcb2b - rework profiling, zoomark tests into single tests so that
they can be used under xdist
2014-08-16 19:49:07 -04:00
Mike Bayer 1fc440393a - fully flake8 test/aaa_profiling 2014-07-09 18:59:16 -04:00
Mike Bayer 08a6a8b519 - Removed some now unneeded version checks [ticket:2829] courtesy alex gaynor 2013-09-22 20:35:40 -04:00
Mike Bayer 3b4168875d - zoomark tests
- rewrite all profiles, we'll review the diffs to see if anything is too far out
2013-05-26 19:47:13 -04:00
Mike Bayer 4b614b9b35 - the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
2013-04-27 19:53:57 -04:00
Mike Bayer 0f56aa56c5 need to disable hstore for the "player" here. should really get rid of the recorder/player thing
at this point
2012-11-18 03:01:49 -05:00
Mike Bayer 08f104f7e7 - import fixes 2012-09-29 16:58:00 -04: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 3986fd7626 adjustments 2012-08-11 02:57:25 -04:00
Mike Bayer 2f522bd221 final cleanup 2012-08-10 11:10:21 -04:00
Mike Bayer 153248cf7b adjust 2012-08-09 17:49:36 -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 22ba1c43b7 -whitespace bonanza, contd 2012-07-28 17:05:50 -04:00
Mike Bayer 9c1a311139 callcount fix 2012-06-13 10:12:16 -04:00
Mike Bayer c238fb0c62 weird, seems like hasattr() doesn't count as a function call in the same way as isinstance()... 2012-06-12 10:32:52 -04:00
Mike Bayer 5cc0bb0474 - [bug] Fixed bug affecting Py3K whereby
string positional parameters passed to
engine/connection execute() would fail to be
interpreted correctly, due to __iter__
being present on Py3K string.
[ticket:2503].  Also in 0.7.8.
2012-06-11 20:11:05 -04:00
Mike Bayer dab892d14f callcount 2012-04-24 22:17:53 -04:00
Mike Bayer 9cf10db8aa - [feature] Calling rollback() within a
session.begin_nested() will now only expire
those objects that had net changes within the
scope of that transaction, that is objects which
were dirty or were modified on a flush.  This
allows the typical use case for begin_nested(),
that of altering a small subset of objects, to
leave in place the data from the larger enclosing
set of objects that weren't modified in
that sub-transaction.  [ticket:2452]
- inline the "register_newly_XYZ" functions to operate
upon collections to reduce method calls
2012-04-24 18:06:27 -04:00
Mike Bayer 87bbba32bc - [feature] The behavior of column targeting
in result sets is now case sensitive by
default.   SQLAlchemy for many years would
run a case-insensitive conversion on these values,
probably to alleviate early case sensitivity
issues with dialects like Oracle and
Firebird.   These issues have been more cleanly
solved in more modern versions so the performance
hit of calling lower() on identifiers is removed.
The case insensitive comparisons can be re-enabled
by setting "case_insensitive=False" on
create_engine().  [ticket:2423]
2012-04-24 16:03:00 -04:00
Mike Bayer 768bd7ec0a callcounts for py3k 2012-03-14 17:19:15 -07:00
Mike Bayer 699146086d - [bug] Fixed bug whereby column_property() created
against ORM-level column could be treated as
a distinct entity when producing certain
kinds of joined-inh joins.  [ticket:2316]

- [bug] related to [ticket:2316], made some
adjustments to the change from [ticket:2261]
regarding the "from" list on a select(). The
_froms collection is no longer memoized, as this
simplifies various use cases and removes the
need for a "warning" if a column is attached
to a table after it was already used in an
expression - the select() construct will now
always produce the correct expression.
There's probably no real-world
performance hit here; select() objects are
almost always made ad-hoc, and systems that
wish to optimize the re-use of a select()
would be using the "compiled_cache" feature.
A hit which would occur when calling select.bind
has been reduced, but the vast majority
of users shouldn't be using "bound metadata"
anyway :).
2011-12-03 19:50:01 -05:00
Mike Bayer e61a443849 minor callcount bump resulting from r3876c9c0b9a4 2011-09-09 17:18:10 -04:00
Mike Bayer 1092fd6590 uurg, add a use_reaper argument and have zoomark skip the reaping for its very special mode of operation... 2011-04-25 22:29:59 -04:00
Mike Bayer e1ec36fc9e - hardcore force every connection into a strong-referenced set, rollback on every test, close on every context.
this uses pool events but bypasses the pool's fairy/record/dispose services.   pypy still seems to expose
some holes in that at least as far as what some (or maybe just one, cant find it yet) of the tests does.
haven't tested this too deeply, just on sqlite + postgres, cypthon 2.7 + pypy.   will see what the buildbot
says
2011-04-25 21:50:26 -04:00
Mike Bayer fbcfd079de callcount update for cext + 2.7 2011-04-17 15:00:27 -04: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 429227fbae - pulling out the PG type impls in create table knocked the counts out a bit (I am assuming/guessing). 2011-02-18 21:32:39 -05:00
Mike Bayer 12073e281e - SchemaItem, SchemaType now descend from common type
SchemaEventTarget, which supplies dispatch
- the dispatch now provides before_parent_attach(),
after_parent_attach(), events which generally bound the _set_parent()
event. [ticket:2037]
- the _on_table_attach mechanism now usually uses the
event dispatch
- fixed class-level event dispatch to propagate to all subclasses, not just
immediate subclasses
- fixed class-level event unpickling to handle more involved
inheritance hierarchies, needed by the new schema event dispatch.
- ForeignKeyConstraint doesn't re-call the column attach event
on ForeignKey objects that are already associated with the correct
Column
- we still need that ImportError on mysqldb CLIENT FLAGS to support
mock DBAPIs
2011-01-30 20:29:48 -05:00
Mike Bayer 86e6c2bafb callcount 2011-01-25 14:08:58 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer fa2f1c5d82 - more skippage of 2.4 2010-12-23 15:51:41 -05:00
Mike Bayer 73f2b37fc9 - remove OrderedSet usage from a critical area 2010-12-22 19:07:04 -05:00
Mike Bayer 78d6c7c62e - arg callcounts change from 2.6.4 to 2.6.6 2010-12-21 21:52:26 -05:00
Mike Bayer b79a5e7640 - another heap of inlinings and now I really have to be done with this 2010-12-21 21:37:52 -05:00
Mike Bayer 6c2cbd2428 callcounts 2010-12-19 20:14:39 -05:00
Mike Bayer 0996188696 - callcounts. need to find some way to make this less tedious. 2010-12-13 10:23:59 -05:00
Mike Bayer 86e8e7c558 - why type.dialect_impl(dialect).bind_processor(dialect), caching just the impl?
just call type._cached_bind_processor(dialect), cache the impl *and* the processor function.
same for result sets.
- use plain dict + update for defaultexecutioncontext.execution_options
2010-12-13 00:15:32 -05:00
Mike Bayer 1125a4b8b1 - another easy win, cache the calc of bind processors in the compiled object 2010-12-12 17:50:25 -05:00
Mike Bayer 0d71ea8126 - inlinings and callcount reductions
- add test coverage for the rare case of noload->lazyload + pickle
2010-12-12 13:01:34 -05:00
Mike Bayer 175f1510d5 callcounts in 2.4 2010-12-05 19:29:47 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer a6b62cc3fe Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual intervention 2010-07-11 13:15:51 -04:00
Mike Bayer 7e72edc9d3 - updated obsolete docs regarding sequences, RETURNING for pg
- 78 chars for postgresql/base.py, engine/default.py
2010-07-06 17:39:20 -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