summaryrefslogtreecommitdiff
path: root/test/engine/test_execute.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-1/+1
| | | | Found using: https://github.com/intgr/topy
* pickle of execption not supported on mysqlconnectorMike Bayer2014-03-281-0/+2
|
* add some more mock structure so tricky DBAPIs like pypy workMike Bayer2014-03-241-0/+8
|
* - add some more rules to make sure all tests run if DBs are availableMike Bayer2014-03-241-0/+1
|
* - rename __multiple__ to __backend__, and apply __backend__ to a large ↵Mike Bayer2014-03-241-234/+8
| | | | | | number of tests. - move out logging tests from test_execute to test_logging
* - Added some new event mechanics for dialect-level events; the initialMike Bayer2014-03-241-1/+110
| | | | | | | implementation allows an event handler to redefine the specific mechanics by which an arbitrary dialect invokes execute() or executemany() on a DBAPI cursor. The new events, at this point semi-public and experimental, are in support of some upcoming transaction-related extensions.
* - An event listener can now be associated with a :class:`.Engine`,Mike Bayer2014-03-221-0/+33
| | | | | | | | | | after one or more :class:`.Connection` objects have been created (such as by an orm :class:`.Session` or via explicit connect) and the listener will pick up events from those connections. Previously, performance concerns pushed the event transfer from :class:`.Engine` to :class:`.Connection` at init-time only, but we've inlined a bunch of conditional checks to make this possible without any additional function calls. fixes #2978
* there's no "assert_call_count" on mockMike Bayer2014-03-221-9/+10
|
* - restore the old behavior of the connection pool replacing itself justMike Bayer2014-03-221-0/+12
| | | | | | | | within userland engine.dispose(); as some SQLA tests already failed when the replace step was removed, due to those conns still being referenced, it's likely this will create surprises for all those users that incorrectly use dispose() and it's not really worth dealing with. This doesn't affect the change we made for ref: #2985.
* - The :meth:`.ConnectionEvents.after_cursor_execute` event is nowMike Bayer2014-03-191-0/+42
| | | | | | | | | | | | emitted for the "_cursor_execute()" method of :class:`.Connection`; this is the "quick" executor that is used for things like when a sequence is executed ahead of an INSERT statement, as well as for dialect startup checks like unicode returns, charset, etc. the :meth:`.ConnectionEvents.before_cursor_execute` event was already invoked here. The "executemany" flag is now always set to False here, as this event always corresponds to a single execution. Previously the flag could be True if we were acting on behalf of an executemany INSERT statement.
* - The MySQL CAST compilation now takes into account aspects of a stringMike Bayer2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | type such as "charset" and "collation". While MySQL wants all character- based CAST calls to use the CHAR type, we now create a real CHAR object at CAST time and copy over all the parameters it has, so that an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will render ``CAST(t.col AS CHAR CHARACTER SET utf8)``. - Added new "unicode returns" detection to the MySQL dialect and to the default dialect system overall, such that any dialect can add extra "tests" to the on-first-connect "does this DBAPI return unicode directly?" detection. In this case, we are adding a check specifically against the "utf8" encoding with an explicit "utf8_bin" collation type (after checking that this collation is available) to test for some buggy unicode behavior observed with MySQLdb version 1.2.3. While MySQLdb has resolved this issue as of 1.2.4, the check here should guard against regressions. The change also allows the "unicode" checks to log in the engine logs, which was not previously the case. [ticket:2906]
* revert r2775c95b1ee30831216cc5 which was mostly an inadvertent commit, ↵Mike Bayer2014-01-131-1/+1
| | | | except for the changelog part
* new changelogMike Bayer2014-01-111-1/+1
|
* - these tests are really old but trying to make sure everything is closed outMike Bayer2014-01-051-40/+40
|
* - A DBAPI that raises an error on ``connect()`` which is not a subclassMike Bayer2013-12-071-8/+26
| | | | | | | | | | | | of dbapi.Error (such as ``TypeError``, ``NotImplementedError``, etc.) will propagate the exception unchanged. Previously, the error handling specific to the ``connect()`` routine would both inappropriately run the exception through the dialect's :meth:`.Dialect.is_disconnect` routine as well as wrap it in a :class:`sqlalchemy.exc.DBAPIError`. It is now propagated unchanged in the same way as occurs within the execute process. [ticket:2881] - add tests for this in test_parseconnect, but also add tests in test_execute to ensure the execute() behavior as well
* -be more agnostic of quotes hereMike Bayer2013-11-231-2/+2
|
* - Fixed bug where SQL statement would be improperly ASCII-encodedMike Bayer2013-11-221-2/+20
| | | | | | | when a pre-DBAPI :class:`.StatementError` were raised within :meth:`.Connection.execute`, causing encoding errors for non-ASCII statements. The stringification now remains within Python unicode thus avoiding encoding errors. [ticket:2871]
* - remove informix dialect, moved out to ↵Mike Bayer2013-11-171-4/+3
| | | | | | https://bitbucket.org/zzzeek/sqlalchemy_informixdb - remove informix, maxdb, access symbols from tests etc.
* - Removed some now unneeded version checks [ticket:2829] courtesy alex gaynorMike Bayer2013-09-221-1/+0
|
* - ensure rowcount is returned for an UPDATE with no implicit returningMike Bayer2013-08-251-27/+27
| | | | | - modernize test for that - use py3k compatible next() in test_returning/test_versioning
* - refactor pool a bit so that intent between ↵Mike Bayer2013-07-021-30/+110
| | | | | | | | | | | | | | ConnectionRecord/ConnectionFairy is clear; make sure that the DBAPI connection passed to the reset-on-return events/dialect hooks is also a "fairy", so that dictionaries like "info" are available. [ticket:2770] - rework the execution_options system so that the dialect is given the job of making any immediate adjustments based on a set event. move the "isolation level" logic to use this new system. Also work things out so that even engine-level execution options can be used for things like isolation level; the dialect attaches a connect-event handler in this case to handle the task. - to support this new system as well as further extensibiltiy of execution options add events engine_connect(), set_connection_execution_options(), set_engine_execution_options()
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-301-10/+14
| | | | | | | | | | | | 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.
* fix test_execute w c extensionsMike Bayer2013-05-261-4/+2
|
* test_execute up for sqlite, pg, oursql, mysql 2.7 + 3.3Mike Bayer2013-05-041-1/+2
|
* - the raw 2to3 runMike Bayer2013-04-271-16/+16
| | | | - went through examples/ and cleaned out excess list() calls
* Merged in nakagami/sqlalchemy/cymysql (pull request #42)Mike Bayer2013-03-071-2/+2
|\ | | | | | | cymysql support
| * test for cymysqlHajime Nakagami2013-02-171-2/+2
| |
* | - Fixed an import of "logging" in test_execute which was notMike Bayer2013-03-021-1/+1
|\ \ | |/ |/| | | | | working on some linux platforms. Also in 0.7.11. - only need "logging.handlers" here, "logging" comes in implicitly
| * test_execute: import logging.handlers to fix AttributeErrorMike Gilbert2013-02-271-1/+1
|/ | | | See also: https://bugs.gentoo.org/show_bug.cgi?id=458684
* Added a new method :meth:`.Engine.execution_options`Mike Bayer2012-10-231-2/+63
| | | | | | | | | | | to :class:`.Engine`. This method works similarly to :class:`.Connection.execution_options` in that it creates a copy of the parent object which will refer to the new set of options. The method can be used to build sharding schemes where each engine shares the same underlying pool of connections. The method has been tested against the horizontal shard recipe in the ORM as well.
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-6/+7
| | | | | | | 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.
* - got firebird runningMike Bayer2012-09-231-5/+5
| | | | | | | | | | | | - add some failure cases - [bug] Firebird now uses strict "ansi bind rules" so that bound parameters don't render in the columns clause of a statement - they render literally instead. - [bug] Support for passing datetime as date when using the DateTime type with Firebird; other dialects support this.
* finished fixes for mxodbc; need to use at least version 3.2.1Mike Bayer2012-09-211-3/+1
|
* - fixes for mxODBC, some pyodbcMike Bayer2012-09-021-6/+10
| | | | | | - enhancements to test suite including ability to set up a testing engine for a whole test class, fixes to how noseplugin sets up/tears down per-class context
* - get all tests within -w engine + pyodbc:mssql on windows to passMike Bayer2012-09-011-4/+4
|
* adjust this test which passes on some psycopg2s, fails on others, and we ↵Mike Bayer2012-08-281-2/+2
| | | | | | dont have a good testing decorator to check this
* - [feature] The "required" flag is set toMike Bayer2012-08-271-6/+4
| | | | | | | | | | True by default, if not passed explicitly, on bindparam() if the "value" or "callable" parameters are not passed. This will cause statement execution to check for the parameter being present in the final collection of bound parameters, rather than implicitly assigning None. [ticket:2556]
* future for with statementMike Bayer2012-08-241-0/+2
|
* - [feature] The before_cursor_execute eventMike Bayer2012-08-231-1/+29
| | | | | | | | | fires off for so-called "_cursor_execute" events, which are usually special-case executions of primary-key bound sequences and default-generation SQL phrases that invoke separately when RETURNING is not used with INSERT. [ticket:2459]
* - add new C extension "utils", so far includes distill_paramsMike Bayer2012-08-071-1/+1
| | | | | - repair test_processors which wasn't hitting the python functions - add another suite to test_processors that does distill_params
* - break out engine/base.py into base, interfaces, result, util.Mike Bayer2012-08-071-5/+5
| | | | - remove deprecated 0.7 engine methods
* - [feature] Connection event listeners canMike Bayer2012-07-181-70/+113
| | | | | | now be associated with individual Connection objects, not just Engine objects. [ticket:2511]
* - [bug] The ResultProxy methods inserted_primary_key,Mike Bayer2012-06-161-0/+54
| | | | | | | | | | | | last_updated_params(), last_inserted_params(), postfetch_cols(), prefetch_cols() all assert that the given statement is a compiled construct, and is an insert() or update() statement as is appropriate, else raise InvalidRequestError. [ticket:2498] - ResultProxy.last_inserted_ids is removed, replaced by inserted_primary_key.
* - [bug] Fixed bug affecting Py3K wherebyMike Bayer2012-06-111-0/+33
| | | | | | | | 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.
* - [bug] If conn.begin() fails when callingMike Bayer2012-04-121-0/+17
| | | | | | "with engine.begin()", the newly acquired Connection is closed explicitly before propagating the exception onward normally.
* - [feature] Added new connection eventMike Bayer2012-04-101-0/+17
| | | | | | | dbapi_error(). Is called for all DBAPI-level errors passing the original DBAPI exception before SQLAlchemy modifies the state of the cursor.
* test failuresMike Bayer2012-02-151-0/+2
|
* - [feature] Added "no_parameters=True" executionMike Bayer2012-02-131-0/+10
| | | | | | | | | | | | | | | | option for connections. If no parameters are present, will pass the statement as cursor.execute(statement), thereby invoking the DBAPIs behavior when no parameter collection is present; for psycopg2 and mysql-python, this means not interpreting % signs in the string. This only occurs with this option, and not just if the param list is blank, as otherwise this would produce inconsistent behavior of SQL expressions that normally escape percent signs (and while compiling, can't know ahead of time if parameters will be present in some cases). [ticket:2407]
* - test failures. one in particular seems to be a weird oursql bug, oh wellMike Bayer2012-02-121-0/+2
|
* - add a context manager availble via Engine.begin()Mike Bayer2012-02-121-0/+134
| | | | | | - add a test suite for all the Engine/Connection/TLEngine transaction/begin helpers/context managers - update docs