summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
Commit message (Collapse)AuthorAgeFilesLines
* - Added a new feature which allows automated naming conventions to beMike Bayer2014-02-011-0/+18
| | | | | | | | | | | | | | | | applied to :class:`.Constraint` and :class:`.Index` objects. Based on a recipe in the wiki, the new feature uses schema-events to set up names as various schema objects are associated with each other. The events then expose a configuration system through a new argument :paramref:`.MetaData.naming_convention`. This system allows production of both simple and custom naming schemes for constraints and indexes on a per-:class:`.MetaData` basis. [ticket:2923] commit 7e65e52c086652de3dd3303c723f98f09af54db8 Author: Mike Bayer <mike_mp@zzzcomputing.com> Date: Sat Feb 1 15:09:04 2014 -0500 - first pass at new naming approach
* add a skip for oracle on thisMike Bayer2014-02-011-0/+24
|
* - repair the fixture/test here to make sure state isn't left over causing ↵Mike Bayer2014-01-271-1/+1
| | | | other tests to fail
* - repair signature for base get_unique_constraints() methodMike Bayer2014-01-201-0/+1
| | | | - test_autoincrement_col still needs reflection overall
* - _cursor_execute() will close the cursor on error; oracle doesn't allow ↵Mike Bayer2014-01-131-2/+2
| | | | | | double close - ensure no iterator changed size issues in testing.engines
* - continue with [ticket:2907] and further clean up how we set upMike Bayer2014-01-131-1/+5
| | | | | | | | | | | | | | _reset_agent, so that it's local to the various begin_impl(), rollback_impl(), etc. this allows setting/resetting of the flag to be symmetric. - don't set _reset_agent if it's not None, don't unset it if it isn't our own transaction. - make sure we clean it out in close(). - basically, we're dealing here with pools using "threadlocal" that have a counter, other various mismatches that the tests bring up - test for recover() now has to invalidate() the previous connection, because closing it actually rolls it back (e.g. this test was relying on the broken behavior).
* - fix some function mismatch in profilingMike Bayer2014-01-091-6/+3
|
* - happy new yearMike Bayer2014-01-0517-17/+17
|
* - support addition of fails_if()/only_on(), just wraps the decoratorsMike Bayer2014-01-021-0/+5
| | | | - update a few exclusions to support current pymssql. passes all of test_suite and dialect/mssql
* - apply a similar fix for floats to mssql+pyodbc as we did to firebirdMike Bayer2013-12-282-4/+30
| | | | | - wrangle through osx+pyodbc+freetds to get at least test_suite to pass again with mssql+pyodbc. invovled adding some silly requirements
* - fix the insert from select test to use a non-autoinc tableMike Bayer2013-12-281-4/+8
|
* - actually check the list of views!Mike Bayer2013-12-271-0/+1
|
* - add a test which creates tables and views at the same time, then tests ↵Mike Bayer2013-12-271-0/+6
| | | | | | that the lists of each can be reflected independently. Testing [ticket:2898] at the moment.
* - repair some suite tests for firebirdMike Bayer2013-12-272-1/+29
|
* - enhance the exclusions system to support database versions within the ↵Mike Bayer2013-12-172-7/+17
| | | | __only_on__ attribute
* - add support for specifying tables or entities for "of"Mike Bayer2013-11-281-2/+2
| | | | | - implement Query with_for_update() - rework docs and tests
* - The precision used when coercing a returned floating point value toMike Bayer2013-11-222-0/+18
| | | | | | | | | | Python ``Decimal`` via string is now configurable. The flag ``decimal_return_scale`` is now supported by all :class:`.Numeric` and :class:`.Float` types, which will ensure this many digits are taken from the native floating point value when it is converted to string. If not present, the type will make use of the value of ``.scale``, if the type supports this setting and it is non-None. Otherwise the original default length of 10 is used. [ticket:2867]
* adjustment to work on py3k as wellMike Bayer2013-11-211-1/+3
|
* - Fixed bug which prevented the ``serializer`` extension from workingMike Bayer2013-11-211-1/+1
| | | | | correctly with table or column names that contain non-ASCII characters. [ticket:2869]
* - add copyright to source files missing itMike Bayer2013-10-2617-1/+98
|
* - use a different approach here since oracle isn't doing it either, just ↵Mike Bayer2013-10-211-3/+6
| | | | round it
* - oursql returns a pure FP here which isn't exactMike Bayer2013-10-211-1/+2
|
* - The typing system now handles the task of rendering "literal bind" values,Mike Bayer2013-10-203-8/+113
| | | | | | | | | | | | | | | e.g. values that are normally bound parameters but due to context must be rendered as strings, typically within DDL constructs such as CHECK constraints and indexes (note that "literal bind" values become used by DDL as of :ticket:`2742`). A new method :meth:`.TypeEngine.literal_processor` serves as the base, and :meth:`.TypeDecorator.process_literal_param` is added to allow wrapping of a native literal rendering method. [ticket:2838] - enhance _get_colparams so that we can send flags like literal_binds into INSERT statements - add support in PG for inspecting standard_conforming_strings - add a new series of roundtrip tests based on INSERT of literal plus SELECT for basic literal rendering in dialect suite
* 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