summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
Commit message (Collapse)AuthorAgeFilesLines
...
* - move away from explicit raises of SkipTest, instead call aMike Bayer2015-05-016-17/+36
| | | | | | | function patched onto config. nose/pytest backends now fill in their exception class here only when loaded - use more public seeming api to get at py.test Skipped exception
* - Fixed an import that prevented "pypy setup.py test" from workingMike Bayer2015-05-011-0/+1
| | | | | correctly. fixes #3406
* - replace old crufty ddl event test fixture with mockMike Bayer2015-04-271-2/+2
|
* - Fixed regression regarding the declarative ``__declare_first__``Mike Bayer2015-04-242-1/+13
| | | | | | and ``__declare_last__`` accessors where these would no longer be called on the superclass of the declarative base. fixes #3383
* - repair a regression caused by #3282, where we no longer wereMike Bayer2015-04-223-4/+18
| | | | | | | | | | applying any topological sort to tables on SQLite. See the changelog for details, but we now continue to sort tables for SQLite on DROP, prohibit the sort from considering alter, and only warn if we encounter an unresolvable cycle, in which case, then we forego the ordering. use_alter as always is used to break such a cycle. fixes #3378
* - Fixed a long-standing bug where the :class:`.Enum` type as usedMike Bayer2015-04-041-1/+1
| | | | | | | | | | with the psycopg2 dialect in conjunction with non-ascii values and ``native_enum=False`` would fail to decode return results properly. This stemmed from when the PG :class:`.postgresql.ENUM` type used to be a standalone type without a "non native" option. fixes #3354 - corrected the assertsql comparison rule to expect a non-ascii SQL string
* - fix this for pg8000 of all backends...Mike Bayer2015-03-241-1/+1
|
* - Turned off the "simple order by" flag on the MSSQL dialect; thisMike Bayer2015-03-241-0/+9
| | | | | | | | | | | is the flag that per :ticket:`2992` causes an order by or group by an expression that's also in the columns clause to be copied by label, even if referenced as the expression object. The behavior for MSSQL is now the old behavior that copies the whole expression in by default, as MSSQL can be picky on these particularly in GROUP BY expressions. fixes #3338 - Add a test that includes a composed label in a GROUP BY
* - The "auto close" for :class:`.ResultProxy` is now a "soft" close.Mike Bayer2015-03-171-3/+6
| | | | | | | | | | | That is, after exhausing all rows using the fetch methods, the DBAPI cursor is released as before and the object may be safely discarded, but the fetch methods may continue to be called for which they will return an end-of-result object (None for fetchone, empty list for fetchmany and fetchall). Only if :meth:`.ResultProxy.close` is called explicitly will these methods raise the "result is closed" error. fixes #3330 fixes #3329
* - copyright 2015Mike Bayer2015-03-1018-18/+18
|
* - expect_warnings was not expecting and neither was assert_warningsMike Bayer2015-02-192-29/+51
| | | | asserting.
* - additional test adjustments for pypy / psycopg2cffi. ThisMike Bayer2015-01-261-0/+4
| | | | | | | | | | consists mainly of adjusting fixtures to ensure connections are closed explicitly. psycopg2cffi also handles unicode bind parameter names differently than psycopg2, and seems to possibly have a little less control over floating point values at least in one test which is marked as a "fail", though will see if it runs differently on linux than osx.. - changelog for psycopg2cffi, fixes #3052
* - rework assertsql system, fixes #3293Mike Bayer2015-01-183-294/+242
|
* - add an exclusion here that helps with the case of 3rd partyMike Bayer2015-01-171-1/+2
| | | | test suite redefining an existing test in test_suite
* - The multi-values version of :meth:`.Insert.values` has beenMike Bayer2015-01-131-0/+3
| | | | | | | | | | | | repaired to work more usefully with tables that have Python- side default values and/or functions, as well as server-side defaults. The feature will now work with a dialect that uses "positional" parameters; a Python callable will also be invoked individually for each row just as is the case with an "executemany" style invocation; a server- side default column will no longer implicitly receive the value explicitly specified for the first row, instead refusing to invoke without an explicit value. fixes #3288
* - more callcountsMike Bayer2015-01-051-2/+4
| | | | - add the platform key to the error output
* - test failures:Mike Bayer2015-01-021-1/+0
| | | | | - test_schema_2 is only on PG and doesn't need a drop all, omit this for now - py3k has exception.args[0], not message
* - repair drop_all_tablesMike Bayer2015-01-021-1/+1
|
* - restate sort_tables in terms of a more fine grainedMike Bayer2015-01-013-12/+60
| | | | | | | | | | | | | sort_tables_and_constraints function. - The DDL generation system of :meth:`.MetaData.create_all` and :meth:`.Metadata.drop_all` has been enhanced to in most cases automatically handle the case of mutually dependent foreign key constraints; the need for the :paramref:`.ForeignKeyConstraint.use_alter` flag is greatly reduced. The system also works for constraints which aren't given a name up front; only in the case of DROP is a name required for at least one of the constraints involved in the cycle. fixes #3282
* - force the _has_events flag to True on engines, so thatMike Bayer2014-12-081-0/+3
| | | | | profiling is more predictable - restore the profiling from before this change
* - rework the assert_sql system so that we have a context manager to work with,Mike Bayer2014-12-073-33/+75
| | | | use events that are local to the engine and to the run and are removed afterwards.
* - enhance only_on() to work with compound specsMike Bayer2014-12-062-1/+6
| | | | - fix "temporary_tables" requirement
* - document / work around that dialect_options isn't necessarily thereMike Bayer2014-12-051-0/+2
|
* - The :meth:`.PGDialect.has_table` method will now query againstMike Bayer2014-12-041-0/+4
| | | | | | | | | | | ``pg_catalog.pg_table_is_visible(c.oid)``, rather than testing for an exact schema match, when the schema name is None; this so that the method will also illustrate that temporary tables are present. Note that this is a behavioral change, as Postgresql allows a non-temporary table to silently overwrite an existing temporary table of the same name, so this changes the behavior of ``checkfirst`` in that unusual scenario. fixes #3264
* Merge remote-tracking branch 'origin/pr/151' into pr151Mike Bayer2014-12-011-4/+4
|\
| * It now calls raise_from_causepr/151Scott Dugas2014-11-031-6/+4
| | | | | | | | | | master was updated to call util.raise_from_cause which is better than what I had
| * Merge branch 'master' into fdbsql-testsScott Dugas2014-11-0311-81/+240
| |\ | | | | | | | | | | | | Conflicts: lib/sqlalchemy/testing/exclusions.py
| * | Removed accidental print statementsScott Dugas2014-10-301-2/+0
| | |
| * | Forgot to update usage of ex to exc_valueScott Dugas2014-10-231-1/+1
| | |
| * | Print useful traceback on errorScott Dugas2014-10-231-4/+6
| | | | | | | | | | | | | | | _expect_failure was rethrowing the exception without keeping the traceback, so it was really hard to find out what was actually wrong
| * | Support additional args/kwargs on cursor methodScott Dugas2014-10-221-4/+6
| | | | | | | | | | | | | | | fdbsql has an optional nested kwarg, which is supported in the actual code, but not in the testing proxy
* | | - add a new option --force-write-profiles to rewrite profiles even if theyMike Bayer2014-11-252-3/+10
| | | | | | | | | | | | are passing
* | | - correct this to rewrite a multiple profile line correctlyMike Bayer2014-11-141-1/+5
| |/ |/|
* | Merge remote-tracking branch 'origin/pr/140' into pr140Mike Bayer2014-10-112-9/+5
|\ \
| * | cleanup exception handling - use new exception hierarchy (since python 2.5)pr/140ndparker2014-10-022-19/+5
| | |
| * | improve exception vs. exit handlingndparker2014-09-231-0/+10
| | |
* | | add more order by hereMike Bayer2014-10-111-1/+1
| | |
* | | - embedding an existing predicate into a new one onlyMike Bayer2014-10-111-2/+1
| | | | | | | | | | | | | | | | | | seems to be used by test_oracle->test_coerce_to_unicode(). The predicate here should treat as a lambda based on enabled_for_config. not sure why this test is not failing on jenkins
* | | - change this literal so that the bound name doesn't have a numericMike Bayer2014-10-111-2/+2
| | | | | | | | | | | | name, this is sort of a bug for oracle
* | | - :meth:`.Insert.from_select` now includes Python and SQL-expressionMike Bayer2014-10-101-1/+36
| | | | | | | | | | | | | | | | | | | | | defaults if otherwise unspecified; the limitation where non- server column defaults aren't included in an INSERT FROM SELECT is now lifted and these expressions are rendered as constants into the SELECT statement.
* | | Merge branch 'reflect-unique-constraints' of ↵Mike Bayer2014-10-041-4/+9
|\ \ \ | |/ / |/| | | | | https://bitbucket.org/jerdfelt/sqlalchemy into pr30
| * | Reflect unique constraints when reflecting a Table objectJohannes Erdfelt2014-09-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to reflect a table did not create any UniqueConstraint objects. The reflection core made no calls to get_unique_constraints and as a result, the sqlite dialect would never reflect any unique constraints. MySQL transparently converts unique constraints into unique indexes, but SQLAlchemy would reflect those as an Index object and as a UniqueConstraint. The reflection core will now deduplicate the unique constraints. PostgreSQL would reflect unique constraints as an Index object and as a UniqueConstraint object. The reflection core will now deduplicate the unique indexes.
* | | - Added support for the Oracle table option ON COMMIT. This is beingMike Bayer2014-09-171-5/+17
|/ / | | | | | | | | | | | | | | | | kept separate from Postgresql's ON COMMIT for now even though ON COMMIT is in the SQL standard; the option is still very specific to temp tables and we eventually would provide a more first class temporary table feature. - oracle can apparently do get_temp_table_names() too, so implement that, fix its get_table_names(), and add it to #3204. fixes #3204 again.
* | - Added :meth:`.Inspector.get_temp_table_names` andMike Bayer2014-09-172-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | :meth:`.Inspector.get_temp_view_names`; currently, only the SQLite dialect supports these methods. The return of temporary table and view names has been **removed** from SQLite's version of :meth:`.Inspector.get_table_names` and :meth:`.Inspector.get_view_names`; other database backends cannot support this information (such as MySQL), and the scope of operation is different in that the tables can be local to a session and typically aren't supported in remote schemas. fixes #3204
* | - raise from cause here to preserve stack traceMike Bayer2014-09-161-1/+1
| |
* | - fix issue where nose Failure object comes into play hereMike Bayer2014-09-151-0/+2
| |
* | - remove some crufty old testing optionsMike Bayer2014-09-146-68/+86
|/ | | | | | | | - reestablish the "bootstrap" system of loading the test runners in testing/plugin; using the updated approach we just came up with for alembic. Coverage should be fixed now when running either py.test or nose. fixes #3196 - upgrade tox.ini and start using a .coveragerc file
* - ensure literal_binds works with LIMIT clause, FOR UPDATEMike Bayer2014-09-031-0/+15
|
* - The :func:`~.expression.column` and :func:`~.expression.table`Mike Bayer2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | constructs are now importable from the "from sqlalchemy" namespace, just like every other Core construct. - The implicit conversion of strings to :func:`.text` constructs when passed to most builder methods of :func:`.select` as well as :class:`.Query` now emits a warning with just the plain string sent. The textual conversion still proceeds normally, however. The only method that accepts a string without a warning are the "label reference" methods like order_by(), group_by(); these functions will now at compile time attempt to resolve a single string argument to a column or label expression present in the selectable; if none is located, the expression still renders, but you get the warning again. The rationale here is that the implicit conversion from string to text is more unexpected than not these days, and it is better that the user send more direction to the Core / ORM when passing a raw string as to what direction should be taken. Core/ORM tutorials have been updated to go more in depth as to how text is handled. fixes #2992
* - refine this a bit to better check for exception typeMike Bayer2014-08-311-7/+8
|