summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
Commit message (Collapse)AuthorAgeFilesLines
* The MySQL :class:`.mysql.SET` type now features the same auto-quotingMike Bayer2013-10-142-22/+28
| | | | | | | behavior as that of :class:`.mysql.ENUM`. Quotes are not required when setting up the value, but quotes that are present will be auto-detected along with a warning. This also helps with Alembic where the SET type doesn't render with quotes. [ticket:2817]
* - fix bug here in profiling.pyMike Bayer2013-08-281-11/+11
| | | | - callcount
* - rework the profile thing to just rewrite all failing numbers when ↵Mike Bayer2013-08-281-6/+18
| | | | | | --write-profiles is set - some sqlite callcounts
* - ensure rowcount is returned for an UPDATE with no implicit returningMike Bayer2013-08-251-2/+2
| | | | | - modernize test for that - use py3k compatible next() in test_returning/test_versioning
* - A large refactoring of the ``sqlalchemy.sql`` package has reorganizedMike Bayer2013-08-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | the import structure of many core modules. ``sqlalchemy.schema`` and ``sqlalchemy.types`` remain in the top-level package, but are now just lists of names that pull from within ``sqlalchemy.sql``. Their implementations are now broken out among ``sqlalchemy.sql.type_api``, ``sqlalchemy.sql.sqltypes``, ``sqlalchemy.sql.schema`` and ``sqlalchemy.sql.ddl``, the last of which was moved from ``sqlalchemy.engine``. ``sqlalchemy.sql.expression`` is also a namespace now which pulls implementations mostly from ``sqlalchemy.sql.elements``, ``sqlalchemy.sql.selectable``, and ``sqlalchemy.sql.dml``. Most of the "factory" functions used to create SQL expression objects have been moved to classmethods or constructors, which are exposed in ``sqlalchemy.sql.expression`` using a programmatic system. Care has been taken such that all the original import namespaces remain intact and there should be no impact on any existing applications. The rationale here was to break out these very large modules into smaller ones, provide more manageable lists of function names, to greatly reduce "import cycles" and clarify the up-front importing of names, and to remove the need for redundant functions and documentation throughout the expression package.
* - assorted fixes raised by pypy 2.1beta2, but all of which are goodMike Bayer2013-08-011-2/+3
| | | | | | | | | | | | | | | ideas in general: - pypy2.1 w/ sqlite3 is the first DBAPI we're seeing returning unicode in cursor.description without being py3k. add a new on-connect check for this, if we get back a u"", just don't do description decoding, should be OK for now. - the set tests in test_collection were assuming the two sets would be ordered the same when it tested pop(), can't really assume that. - test_serializer gets worse and worse, pickle is just not really viable here, ding out pypy - pypy2.1b2 seems to allow cursor.lastrowid to work (or we changed something?) - pool._threadconns.current() is a weakref, it can be None - another one of those logging.handlers imports
* - use inline=True for the insert..select here so it works on oracleMike Bayer2013-07-121-2/+2
|
* - Added new method to the :func:`.insert` constructMike Bayer2013-07-052-0/+34
| | | | | | | | | | :meth:`.Insert.from_select`. Given a list of columns and a selectable, renders ``INSERT INTO (table) (columns) SELECT ..``. While this feature is highlighted as part of 0.9 it is also backported to 0.8.3. [ticket:722] - The :func:`.update`, :func:`.insert`, and :func:`.delete` constructs will now interpret ORM entities as FROM clauses to be operated upon, in the same way that select() already does. Also in 0.8.3.
* add a float exclusion to help oursql build 100%Mike Bayer2013-07-022-0/+10
|
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-302-0/+17
| | | | | | | | | | | | 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.
* improve the close handling here so that we don't double-close a connection;Mike Bayer2013-06-281-3/+5
| | | | we log this now so it apparently happens a bunch
* Fix indexes reflection in PostgreSQLpr/13Roman Podolyaka2013-06-261-1/+6
| | | | | | Reflection of indexes must preserve the order of columns. Fixes issue 2767.
* Merge pull request #11 from malor/fix_uc_reflectionmike bayer2013-06-231-3/+8
|\ | | | | Fix unique constraints reflection in SQLite and PostgreSQL
| * Fix unique constraints reflection in PostgreSQLpr/11Roman Podolyaka2013-06-231-2/+2
| | | | | | | | Reflection of unique constraints must preserve the order of columns.
| * Fix unique constraints reflection in SQLiteRoman Podolyaka2013-06-231-0/+4
| | | | | | | | | | | | | | If SQLite keywords are used as column names, they are quoted. The code parsing the information about table unique constraints should be modified so that it properly removes double-quotes from column names.
| * Improve _test_get_unique_constraints()Roman Podolyaka2013-06-231-1/+2
| | | | | | | | | | | | Call eq_() in a loop instead of comparing two lists directly. This makes it much easier to find out which element is not equal to the reference value.
* | Fix unicode literals on Python 3.1 and 3.2pr/10Roman Podolyaka2013-06-231-1/+2
|/ | | | | A few tests use u'' unicode literals which are not supported in Python versions 3.1 and 3.2.
* - get_unique_constraints() pull requestMike Bayer2013-06-092-1/+49
| | | | | | - version (0.9 for now) - changelog - move the test into the test suite so that all dialects can take advantage of it
* remove all remaining start/end py2k/py3k blocksMike Bayer2013-06-071-8/+8
|
* Merge branch 'ticket_2587'Mike Bayer2013-06-041-5/+10
|\ | | | | | | | | | | Conflicts: test/profiles.txt test/sql/test_selectable.py
| * clean up the dialect selection thing hereMike Bayer2013-06-041-8/+12
| |
| * working through tests....Mike Bayer2013-06-021-6/+7
| |
* | Merge branch 'master' into ticket_1068Mike Bayer2013-06-031-4/+4
|\ \
| * | - fdb is now official, [ticket:2504]Mike Bayer2013-06-031-4/+4
| |/ | | | | | | | | - restore the rollback cleanup handler, pg8000 is mostly obsolete as a dialect and the firebird drivers need it
* | Merge branch 'master' into ticket_1068Mike Bayer2013-06-0315-90/+99
|\ \ | |/
| * - zoomark testsMike Bayer2013-05-261-1/+1
| | | | | | | | - rewrite all profiles, we'll review the diffs to see if anything is too far out
| * a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-263-25/+23
| | | | | | | | as possible
| * fix the unicode test suiteMike Bayer2013-05-261-7/+8
| |
| * test_execute up for sqlite, pg, oursql, mysql 2.7 + 3.3Mike Bayer2013-05-041-1/+1
| |
| * - endless isinstance(x, str)s....Mike Bayer2013-04-284-21/+29
| |
| * - the raw 2to3 runMike Bayer2013-04-2715-92/+94
| | | | | | | | - went through examples/ and cleaned out excess list() calls
* | still not locating more nested expressions, may need to match on nameMike Bayer2013-05-272-0/+84
|/
* - Fixed bug in unit of work whereby a joined-inheritanceMike Bayer2013-04-012-5/+4
| | | | | | | | | | | subclass could insert the row for the "sub" table before the parent table, if the two tables had no ForeignKey constraints set up between them. Also in 0.7.11. [ticket:2689] - fix a glitch in the assertsql.CompiledSQL fixture regarding when a multiparam compiledSQL is used within an AllOf - add a new utility function randomize_unitofwork() which does the function of --reversetop
* - add a nose runner that erases out argv, otherwiseMike Bayer2013-03-252-1/+10
| | | | | you get "import test" as what it tries to run with setup.py test
* - limit some of these on views, indexes, pk constraints being availableMike Bayer2013-03-241-2/+8
|
* - add an event to testing so that other dialects can intercept ↵Mike Bayer2013-03-242-11/+20
| | | | | | "test_needs_autoincrement" - get the assumption of "1" for "first sequence item" to be dialect configured
* - remove all compat items that are pre-2.5 (hooray)Mike Bayer2013-03-092-4/+3
| | | | | | - other cleanup - don't need compat.decimal, that approach never panned out. hopefully outside libs aren't pulling it in, they shouldn't be
* mymysql dialectHajime Nakagami2013-03-011-1/+1
|
* - fix exclusion hereMike Bayer2013-02-062-8/+5
| | | | - mysql doesn't reset table counter here so test differently
* port numeric tests to dialect suiteMike Bayer2013-02-062-1/+181
|
* - adding in requirementsMike Bayer2013-02-064-3/+110
| | | | - get test_naturalpks to be more generalized
* - add support for pulling in an external requirements fileMike Bayer2013-02-062-6/+68
| | | | - start filling in default versions of remaining requirements that are still only in test/
* - cleanup HasSequence and move it to test_sequencesMike Bayer2013-02-062-42/+58
|
* - add an explicit test for sequences "optional"Mike Bayer2013-02-062-1/+27
|
* - add an "empty_inserts" requirement target plus a suite testMike Bayer2013-02-065-0/+153
| | | | - add suite tests for basic explicit Sequence support, result-row column access (tests that name_normalize is set correctly among many other things)
* - use SQL constructs here for databases that need to escape names like "data"Mike Bayer2013-01-271-5/+4
|
* - preparing for #695, modernize constraint/index testsMike Bayer2013-01-161-4/+9
|
* Fixed table reflection for Oracle when accessing a synonym that refersMike Bayer2012-12-091-2/+8
| | | | | | | | | | to a DBLINK remote database; while the syntax has been present in the Oracle dialect for some time, up until now it has never been tested. The syntax has been tested against a sample database linking to itself, however there's still some uncertainty as to what should be used for the "owner" when querying the remote database for table information. Currently, the value of "username" from user_db_links is used to match the "owner". [ticket:2619]
* internally at least refer to multirow as "multivalues", to distinguish betweenMike Bayer2012-12-081-2/+2
| | | | | an INSERT that's used in executemany() as opposed to one which has a VALUES clause with multiple entries.
* - multivalued inserts, [ticket:2623]Mike Bayer2012-12-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update "not supported" messages for empty inserts, mutlivalue inserts - rework the ValuesBase approach for multiple value sets so that stmt.parameters does store a list for multiple values; the _has_multiple_parameters flag now indicates which of the two modes the statement is within. it now raises exceptions if a subsequent call to values() attempts to call a ValuesBase with one mode in the style of the other mode; that is, you can't switch a single- or multi- valued ValuesBase to the other mode, and also if a multiple value is passed simultaneously with a kwargs set. Added tests for these error conditions - Calling values() multiple times in multivalue mode now extends the parameter list to include the new parameter sets. - add error/test if multiple *args were passed to ValuesBase.values() - rework the compiler approach for multivalue inserts, back to where _get_colparams() returns the same list of (column, value) as before, thereby maintaining the identical number of append() and other calls when multivalue is not enabled. In the case of multivalue, it makes a last-minute switch to return a list of lists instead of the single list. As it constructs the additional lists, the inline defaults and other calculated default parameters of the first parameter set are copied into the newly generated lists so that these features continue to function for a multivalue insert. Multivalue inserts now add no additional function calls to the compilation for regular insert constructs. - parameter lists for multivalue inserts now includes an integer index for all parameter sets. - add detailed documentation for ValuesBase.values(), including careful wording to describe the difference between multiple values and an executemany() call. - add a test for multivalue insert + returning - it works ! - remove the very old/never used "postgresql_returning"/"firebird_returning" flags.