Commit Graph

50 Commits

Author SHA1 Message Date
Mike Bayer 31f80b9eae Refactor for cx_Oracle version 6
Drops support for cx_Oracle prior to version 5.x, reworks
numeric and binary support.

Fixes: #4064

Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480
2017-09-11 14:17:10 -04:00
Mike Bayer 2419bfe34c - fix stray connection 2016-01-23 17:31:02 -05:00
Mike Bayer a007c6e616 put a greater variance into this test to prevent sporadic failures 2014-07-21 12:09:12 -04:00
Mike Bayer 1fc440393a - fully flake8 test/aaa_profiling 2014-07-09 18:59:16 -04:00
Mike Bayer 2f150bee28 - rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.
- move out logging tests from test_execute to test_logging
2014-03-24 11:33:53 -04:00
Mike Bayer 02f21ffcf3 - The :class:.RowProxy object is now sortable in Python as a regular
tuple is; this is accomplished via ensuring tuple() conversion on
both sides within the ``__eq__()`` method as well as
the addition of a ``__lt__()`` method. [ticket:2848]
2013-11-19 19:29:18 -05:00
Mike Bayer b38a76cd1d - replace most explicitly-named test objects called "Mock..." with
actual mock objects from the mock library.  I'd like to use mock
for new tests so we might as well use it in obvious places.
- use unittest.mock in py3.3
- changelog
- add a note to README.unittests
- add tests_require in setup.py
- have tests import from sqlalchemy.testing.mock
- apply usage of mock to one of the event tests.  we can be using
this approach all over the place.
2013-06-30 18:35:12 -04:00
Mike Bayer 6cde27fe91 a pass where we try to squash down as many list()/keys() combinations
as possible
2013-05-26 19:06: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 be40b51cb0 getting everything to pass again 2012-09-27 16:33:54 -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 a4c651420b - this is a refcount test 2012-08-11 17:55:37 -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 781fff75d0 adjustment 2012-08-09 16:52:11 -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 c13d4f613f - fixes 2012-08-07 14:55:41 -04:00
Mike Bayer 37ced0946c - some more interpret_as_froms 2012-07-23 20:59:46 -04:00
Mike Bayer e6749b6973 make sure integer is here. only the C ext doesn't try to call "key_fallback" for integer here,
pure python one does.
2012-06-11 12:15:15 -04:00
Mike Bayer c6d599f993 - [bug] Fixed memory leak in C version of
result proxy whereby DBAPIs which don't deliver
    pure Python tuples for result rows would
    fail to decrement refcounts correctly.
    The most prominently affected DBAPI
    is pyodbc.  [ticket:2489]
2012-06-01 16:22:44 -04:00
Mike Bayer 554200e3e5 callcount bump to work around sqlite's silly column name workaround 2012-05-04 20:44:12 -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 c235b4a335 callcounts 2012-03-14 15:30:10 -07:00
Mike Bayer d60bc21fc6 fix callcount 2012-02-26 19:42:16 -05:00
Mike Bayer 28a5529fbf callcounts 2012-02-15 11:50:01 -05:00
Mike Bayer 7feaad21e6 test failures 2012-02-15 10:13:47 -05:00
Mike Bayer 2876573482 callcount adjust 2012-02-05 15:48:15 -05:00
Mike Bayer eae80bb046 put some variance on this as it's a difference between 9 and 60 calls 2011-06-04 21:58:56 -04:00
Mike Bayer 09080baad1 - Adjusted the __contains__() method of
a RowProxy result row such that no exception
throw is generated internally;
NoSuchColumnError() also will generate its
message regardless of whether or not the column
construct can be coerced to a string.
[ticket:2178].  Also in 0.6.8.
2011-06-04 20:52:30 -04:00
Mike Bayer 46ee78431c mark all aaa_profiling tests with __requires__ = 'cpython', 2011-04-23 12:34:38 -07: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 015110267e - allow cextension version to fall back to non-cextension
- start taking out "default" version, 2.4 version, only need these tests
in a relative sense
2010-12-22 20:36:20 -05:00
Mike Bayer 73f2b37fc9 - remove OrderedSet usage from a critical area 2010-12-22 19:07:04 -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 840fefa710 - callcounts 2010-12-19 18:52:46 -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 1125a4b8b1 - another easy win, cache the calc of bind processors in the compiled object 2010-12-12 17:50:25 -05:00
Mike Bayer 15297eb4fb callcounts... 2010-12-05 17:47:09 -05:00
Mike Bayer 1562860fea up this variance a bit, differences between 2.6.3/2.6.4 not worth it 2010-12-05 17:40:51 -05:00
Mike Bayer 1c16f373d9 callcounts for 2.4, 2.5, 2.6 2010-12-05 16:39:15 -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 e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer a41c50ad63 - Implemented sequence check capability for the C
version of RowProxy, as well as 2.7 style
"collections.Sequence" registration for RowProxy.
[ticket:1871]
2010-11-09 11:40:23 -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
Gaëtan de Menten 165609a190 - Added an optional C extension to speed up the sql layer by
reimplementing the highest impact functions.
  The actual speedups will depend heavily on your DBAPI and
  the mix of datatypes used in your tables, and can vary from
  a 50% improvement to more than 200%. It also provides a modest
  (~20%) indirect improvement to ORM speed for large queries.
  Note that it is *not* built/installed by default.
  See README for installation instructions.

- The most common result processors conversion function were
  moved to the new "processors" module.  Dialect authors are
  encouraged to use those functions whenever they correspond
  to their needs instead of implementing custom ones.
2010-02-13 22:53:39 +00:00
Mike Bayer 5119ce78b5 - The psycopg2 dialect now uses psycopg2's "unicode extension"
on all new connections, which allows all String/Text/etc.
types to skip the need to post-process bytestrings into
unicode (an expensive step due to its volume).  Other
dialects which return unicode natively (pg8000, zxjdbc)
also skip unicode post-processing.

- String/Text/Unicode types now skip the unicode() check
on each result column value if the dialect has
detected the DBAPI as returning Python unicode objects
natively.  This check is issued on first connect
using "SELECT CAST 'some text' AS VARCHAR(10)" or
equivalent, then checking if the returned object
is a Python unicode.   This allows vast performance
increases for native-unicode DBAPIs, including
pysqlite/sqlite3, psycopg2, and pg8000.
2009-10-26 00:32:39 +00:00
Mike Bayer fafbe57b30 fix some 2.4 callcounts 2009-10-24 20:36:44 +00:00
Mike Bayer 52b1ace676 - ResultProxy internals have been overhauled to greatly reduce
method call counts when fetching columns that have no
type-level processing applied.   Provides a 100% speed
improvement when fetching large result sets with no unicode
conversion.  Many thanks to Elixir's Gaëtan de Menten
for this dramatic improvement !  [ticket:1586]
2009-10-24 16:38:07 +00:00