[Sqlalchemy-commits] sqlalchemy: - Column.copy(), as used in table.tometadata(), copi...
Brought to you by:
zzzeek
From: <co...@sq...> - 2011-01-30 18:12:23
|
details: http://hg.sqlalchemy.org/sqlalchemy/sqlalchemy/rev/00b2f659f4e9 changeset: 7295:00b2f659f4e9 user: zzzeek date: Sun Jan 30 13:09:45 2011 -0500 description: - Column.copy(), as used in table.tometadata(), copies the 'doc' attribute. [ticket:2028] Subject: sqlalchemy: - Column.copy(), as used in table.tometadata(), copies the details: http://hg.sqlalchemy.org/sqlalchemy/sqlalchemy/rev/6b7ae2ab9a29 changeset: 7296:6b7ae2ab9a29 user: zzzeek date: Sun Jan 30 13:11:50 2011 -0500 description: - Column.copy(), as used in table.tometadata(), copies the 'doc' attribute. [ticket:2028] diffstat: .hgignore | 1 - .hgtags | 1 + CHANGES | 179 +- LICENSE | 2 +- README.py3k | 14 +- README.unittests | 78 +- doc/build/core/engines.rst | 23 +- doc/build/core/event.rst | 99 - doc/build/core/events.rst | 27 - doc/build/core/expression_api.rst | 2 +- doc/build/core/index.rst | 4 +- doc/build/core/interfaces.rst | 17 +- doc/build/core/pooling.rst | 12 +- doc/build/core/schema.rst | 120 +- doc/build/core/tutorial.rst | 4 +- doc/build/core/types.rst | 32 +- doc/build/dialects/drizzle.rst | 70 - doc/build/dialects/index.rst | 1 - doc/build/dialects/mysql.rst | 4 - doc/build/dialects/postgresql.rst | 2 - doc/build/dialects/sqlite.rst | 2 - doc/build/intro.rst | 8 +- doc/build/orm/events.rst | 43 - doc/build/orm/extensions/hybrid.rst | 15 - doc/build/orm/extensions/index.rst | 7 - doc/build/orm/extensions/mutable.rst | 24 - doc/build/orm/index.rst | 3 +- doc/build/orm/interfaces.rst | 92 +- doc/build/orm/loading.rst | 15 +- doc/build/orm/mapper_config.rst | 179 +- doc/build/orm/session.rst | 2 - doc/build/orm/tutorial.rst | 32 +- examples/beaker_caching/caching_query.py | 17 +- examples/custom_attributes/custom_management.py | 3 +- examples/custom_attributes/listen_for_events.py | 46 +- examples/derived_attributes/__init__.py | 10 + examples/derived_attributes/attributes.py | 168 + examples/sharding/attribute_shard.py | 24 +- examples/versioning/test_versioning.py | 7 +- examples/vertical/dictlike-polymorphic.py | 64 +- lib/sqlalchemy/__init__.py | 3 +- lib/sqlalchemy/connectors/mxodbc.py | 3 + lib/sqlalchemy/connectors/mysqldb.py | 147 - lib/sqlalchemy/connectors/pyodbc.py | 1 + lib/sqlalchemy/databases/__init__.py | 2 - lib/sqlalchemy/dialects/__init__.py | 1 - lib/sqlalchemy/dialects/access/base.py | 5 + lib/sqlalchemy/dialects/drizzle/__init__.py | 18 - lib/sqlalchemy/dialects/drizzle/base.py | 576 --- lib/sqlalchemy/dialects/drizzle/mysqldb.py | 65 - lib/sqlalchemy/dialects/firebird/base.py | 12 +- lib/sqlalchemy/dialects/firebird/kinterbasdb.py | 2 +- lib/sqlalchemy/dialects/maxdb/base.py | 11 +- lib/sqlalchemy/dialects/mssql/adodbapi.py | 1 - lib/sqlalchemy/dialects/mssql/base.py | 74 +- lib/sqlalchemy/dialects/mssql/information_schema.py | 2 +- lib/sqlalchemy/dialects/mssql/mxodbc.py | 6 +- lib/sqlalchemy/dialects/mssql/pymssql.py | 1 + lib/sqlalchemy/dialects/mssql/pyodbc.py | 27 +- lib/sqlalchemy/dialects/mysql/__init__.py | 2 +- lib/sqlalchemy/dialects/mysql/base.py | 124 +- lib/sqlalchemy/dialects/mysql/mysqldb.py | 160 +- lib/sqlalchemy/dialects/mysql/pymysql.py | 36 - lib/sqlalchemy/dialects/oracle/base.py | 13 +- lib/sqlalchemy/dialects/oracle/cx_oracle.py | 14 +- lib/sqlalchemy/dialects/oracle/zxjdbc.py | 2 +- lib/sqlalchemy/dialects/postgresql/base.py | 131 +- lib/sqlalchemy/dialects/postgresql/pg8000.py | 4 +- lib/sqlalchemy/dialects/postgresql/psycopg2.py | 62 +- lib/sqlalchemy/dialects/postgresql/pypostgresql.py | 2 + lib/sqlalchemy/dialects/sqlite/base.py | 94 +- lib/sqlalchemy/dialects/sqlite/pysqlite.py | 45 +- lib/sqlalchemy/dialects/sybase/base.py | 2 - lib/sqlalchemy/dialects/sybase/pyodbc.py | 2 +- lib/sqlalchemy/engine/base.py | 659 +-- lib/sqlalchemy/engine/ddl.py | 28 +- lib/sqlalchemy/engine/default.py | 457 +- lib/sqlalchemy/engine/reflection.py | 6 +- lib/sqlalchemy/engine/strategies.py | 25 +- lib/sqlalchemy/engine/threadlocal.py | 20 +- lib/sqlalchemy/event.py | 286 - lib/sqlalchemy/events.py | 325 - lib/sqlalchemy/ext/declarative.py | 108 +- lib/sqlalchemy/ext/horizontal_shard.py | 4 +- lib/sqlalchemy/ext/hybrid.py | 421 -- lib/sqlalchemy/ext/mutable.py | 538 --- lib/sqlalchemy/ext/sqlsoup.py | 7 +- lib/sqlalchemy/interfaces.py | 103 +- lib/sqlalchemy/log.py | 199 +- lib/sqlalchemy/orm/__init__.py | 192 +- lib/sqlalchemy/orm/attributes.py | 1217 ++++- lib/sqlalchemy/orm/collections.py | 25 +- lib/sqlalchemy/orm/dependency.py | 109 +- lib/sqlalchemy/orm/deprecated_interfaces.py | 579 --- lib/sqlalchemy/orm/descriptor_props.py | 400 -- lib/sqlalchemy/orm/dynamic.py | 32 +- lib/sqlalchemy/orm/events.py | 1044 ----- lib/sqlalchemy/orm/identity.py | 53 +- lib/sqlalchemy/orm/instrumentation.py | 691 --- lib/sqlalchemy/orm/interfaces.py | 532 ++- lib/sqlalchemy/orm/mapper.py | 975 ++-- lib/sqlalchemy/orm/properties.py | 345 +- lib/sqlalchemy/orm/query.py | 242 +- lib/sqlalchemy/orm/scoping.py | 86 +- lib/sqlalchemy/orm/session.py | 280 +- lib/sqlalchemy/orm/state.py | 240 +- lib/sqlalchemy/orm/strategies.py | 486 +- lib/sqlalchemy/orm/sync.py | 16 +- lib/sqlalchemy/orm/unitofwork.py | 116 +- lib/sqlalchemy/orm/util.py | 189 +- lib/sqlalchemy/pool.py | 291 +- lib/sqlalchemy/queue.py | 191 + lib/sqlalchemy/schema.py | 458 +- lib/sqlalchemy/sql/compiler.py | 500 +- lib/sqlalchemy/sql/expression.py | 381 +- lib/sqlalchemy/sql/operators.py | 6 - lib/sqlalchemy/sql/util.py | 14 +- lib/sqlalchemy/test/__init__.py | 33 + lib/sqlalchemy/test/assertsql.py | 300 + lib/sqlalchemy/test/engines.py | 311 + lib/sqlalchemy/test/entities.py | 89 + lib/sqlalchemy/test/orm.py | 117 + lib/sqlalchemy/test/pickleable.py | 81 + lib/sqlalchemy/test/profiling.py | 228 + lib/sqlalchemy/test/requires.py | 333 + lib/sqlalchemy/test/schema.py | 85 + lib/sqlalchemy/test/testing.py | 803 ++++ lib/sqlalchemy/test/util.py | 81 + lib/sqlalchemy/topological.py | 83 + lib/sqlalchemy/types.py | 398 +- lib/sqlalchemy/util.py | 1875 ++++++++++ lib/sqlalchemy/util/__init__.py | 32 - lib/sqlalchemy/util/_collections.py | 897 ----- lib/sqlalchemy/util/compat.py | 209 - lib/sqlalchemy/util/deprecations.py | 118 - lib/sqlalchemy/util/langhelpers.py | 737 ---- lib/sqlalchemy/util/queue.py | 191 - lib/sqlalchemy/util/topological.py | 83 - lib/sqlalchemy_nose/config.py | 173 + lib/sqlalchemy_nose/noseplugin.py | 166 + setup.cfg | 3 +- setup.py | 13 +- sqla_nose.py | 18 +- test/aaa_profiling/test_compiler.py | 34 +- test/aaa_profiling/test_memusage.py | 43 +- test/aaa_profiling/test_orm.py | 112 +- test/aaa_profiling/test_pool.py | 10 +- test/aaa_profiling/test_resultset.py | 54 +- test/aaa_profiling/test_zoomark.py | 30 +- test/aaa_profiling/test_zoomark_orm.py | 27 +- test/base/test_dependency.py | 16 +- test/base/test_events.py | 264 - test/base/test_except.py | 2 +- test/base/test_utils.py | 10 +- test/bootstrap/config.py | 167 - test/bootstrap/noseplugin.py | 180 - test/dialect/test_access.py | 2 +- test/dialect/test_firebird.py | 4 +- test/dialect/test_informix.py | 2 +- test/dialect/test_maxdb.py | 8 +- test/dialect/test_mssql.py | 64 +- test/dialect/test_mxodbc.py | 4 +- test/dialect/test_mysql.py | 48 +- test/dialect/test_oracle.py | 50 +- test/dialect/test_postgresql.py | 125 +- test/dialect/test_sqlite.py | 88 +- test/dialect/test_sybase.py | 2 +- test/engine/_base.py | 4 +- test/engine/test_bind.py | 8 +- test/engine/test_ddlevents.py | 266 +- test/engine/test_execute.py | 431 +-- test/engine/test_metadata.py | 435 ++ test/engine/test_parseconnect.py | 4 +- test/engine/test_pool.py | 364 +- test/engine/test_reconnect.py | 11 +- test/engine/test_reflection.py | 40 +- test/engine/test_transaction.py | 145 +- test/ex/test_examples.py | 2 +- test/ext/test_associationproxy.py | 6 +- test/ext/test_compiler.py | 2 +- test/ext/test_declarative.py | 226 +- test/ext/test_horizontal_shard.py | 51 +- test/ext/test_hybrid.py | 240 - test/ext/test_mutable.py | 284 - test/ext/test_orderinglist.py | 4 +- test/ext/test_serializer.py | 16 +- test/ext/test_sqlsoup.py | 2 +- test/lib/__init__.py | 27 - test/lib/assertsql.py | 314 - test/lib/engines.py | 297 - test/lib/entities.py | 83 - test/lib/orm.py | 111 - test/lib/pickleable.py | 75 - test/lib/profiling.py | 238 - test/lib/requires.py | 353 -- test/lib/schema.py | 79 - test/lib/testing.py | 795 ---- test/lib/util.py | 125 - test/orm/_base.py | 9 +- test/orm/_fixtures.py | 6 +- test/orm/inheritance/test_abc_inheritance.py | 4 +- test/orm/inheritance/test_abc_polymorphic.py | 4 +- test/orm/inheritance/test_basic.py | 189 +- test/orm/inheritance/test_concrete.py | 10 +- test/orm/inheritance/test_magazine.py | 6 +- test/orm/inheritance/test_manytomany.py | 4 +- test/orm/inheritance/test_poly_linked_list.py | 10 +- test/orm/inheritance/test_polymorph.py | 75 +- test/orm/inheritance/test_polymorph2.py | 10 +- test/orm/inheritance/test_productspec.py | 4 +- test/orm/inheritance/test_query.py | 92 +- test/orm/inheritance/test_selects.py | 2 +- test/orm/inheritance/test_single.py | 6 +- test/orm/test_association.py | 6 +- test/orm/test_assorted_eager.py | 82 +- test/orm/test_attributes.py | 500 +- test/orm/test_backref_mutations.py | 13 +- test/orm/test_bind.py | 8 +- test/orm/test_cascade.py | 1225 +----- test/orm/test_collection.py | 35 +- test/orm/test_compile.py | 37 +- test/orm/test_composites.py | 243 +- test/orm/test_cycles.py | 8 +- test/orm/test_defaults.py | 16 +- test/orm/test_deprecations.py | 6 +- test/orm/test_descriptor.py | 133 - test/orm/test_dynamic.py | 9 +- test/orm/test_eager_relations.py | 76 +- test/orm/test_evaluator.py | 8 +- test/orm/test_events.py | 1031 ----- test/orm/test_expire.py | 10 +- test/orm/test_extendedattr.py | 77 +- test/orm/test_froms.py | 1593 --------- test/orm/test_generative.py | 19 +- test/orm/test_immediate_load.py | 4 +- test/orm/test_instrumentation.py | 241 +- test/orm/test_joins.py | 1711 --------- test/orm/test_lazy_relations.py | 10 +- test/orm/test_legacy_mutable.py | 353 -- test/orm/test_load_on_fks.py | 6 +- test/orm/test_manytomany.py | 10 +- test/orm/test_mapper.py | 535 ++- test/orm/test_merge.py | 122 +- test/orm/test_naturalpks.py | 10 +- test/orm/test_onetoone.py | 4 +- test/orm/test_pickled.py | 44 +- test/orm/test_query.py | 3347 +++++++++++++++++- test/orm/test_relationships.py | 128 +- test/orm/test_scoping.py | 182 +- test/orm/test_selectable.py | 35 +- test/orm/test_session.py | 251 +- test/orm/test_subquery_relations.py | 10 +- test/orm/test_transaction.py | 7 +- test/orm/test_unitofwork.py | 372 +- test/orm/test_unitofworkv2.py | 75 +- test/orm/test_utils.py | 46 +- test/orm/test_versioning.py | 122 +- test/perf/README | 17 - test/perf/cascade_speed.py | 93 + test/perf/insertspeed.py | 2 +- test/perf/large_flush.py | 2 +- test/perf/masscreate.py | 39 + test/perf/masscreate2.py | 36 + test/perf/masseagerload.py | 54 + test/perf/massload.py | 63 + test/perf/massload2.py | 70 + test/perf/masssave.py | 54 + test/perf/objselectspeed.py | 4 +- test/perf/objupdatespeed.py | 4 +- test/perf/orm2010.py | 186 - test/perf/ormsession.py | 4 +- test/perf/poolload.py | 37 + test/perf/sessions.py | 4 +- test/perf/stress_all.py | 2 +- test/perf/wsgi.py | 52 + test/sql/test_case_statement.py | 4 +- test/sql/test_columns.py | 95 + test/sql/test_compiler.py | 74 +- test/sql/test_constraints.py | 47 +- test/sql/test_defaults.py | 218 +- test/sql/test_functions.py | 14 +- test/sql/test_generative.py | 19 +- test/sql/test_labels.py | 4 +- test/sql/test_metadata.py | 586 --- test/sql/test_query.py | 101 +- test/sql/test_quote.py | 6 +- test/sql/test_returning.py | 6 +- test/sql/test_rowcount.py | 2 +- test/sql/test_selectable.py | 4 +- test/sql/test_types.py | 190 +- test/sql/test_unicode.py | 4 +- test/zblog/blog.py | 35 + test/zblog/mappers.py | 135 + test/zblog/tables.py | 53 + test/zblog/test_zblog.py | 116 + test/zblog/user.py | 41 + 296 files changed, 18230 insertions(+), 27258 deletions(-) diffs (truncated from 59639 to 300 lines): diff -r 586a55fdf15f -r 6b7ae2ab9a29 .hgignore --- a/.hgignore Wed Jan 26 11:50:00 2011 -0500 +++ b/.hgignore Sun Jan 30 13:11:50 2011 -0500 @@ -5,7 +5,6 @@ .orig$ .egg-info .*,cover -.un~ \.coverage \.DS_Store test.cfg diff -r 586a55fdf15f -r 6b7ae2ab9a29 .hgtags --- a/.hgtags Wed Jan 26 11:50:00 2011 -0500 +++ b/.hgtags Sun Jan 30 13:11:50 2011 -0500 @@ -76,3 +76,4 @@ 1db7766705b70f5326b614699b7c06d46168d19d rel_0_6_3 2db46b7f51c1e64f06d9c31c49ff6e15be98e9ca rel_0_6_4 ff12fe7cac947ce9e28be4e8b4473df2c0adaa04 rel_0_6_5 +3ef75b251d060573ccd994598d03f3c30f0e012c rel_0_6_6 diff -r 586a55fdf15f -r 6b7ae2ab9a29 CHANGES --- a/CHANGES Wed Jan 26 11:50:00 2011 -0500 +++ b/CHANGES Sun Jan 30 13:11:50 2011 -0500 @@ -3,176 +3,11 @@ ======= CHANGES ======= -0.7.0b1 -======= -- Detailed descriptions of each change below are - described at: - http://www.sqlalchemy.org/trac/wiki/07Migration - -- general - - New event system, supercedes all extensions, listeners, - etc. [ticket:1902] - - - Logging enhancements - [ticket:1926] - - - Setup no longer installs a Nose plugin - [ticket:1949] - -- orm - - More succinct form of query.join(target, onclause) - [ticket:1923] - - - Hybrid Attributes, implements/supercedes synonym() - [ticket:1903] - - - Rewrite of composites [ticket:2008] - - - Mutation Event Extension, supercedes "mutable=True" - - - PickleType and ARRAY mutability turned off by default - [ticket:1980] - - - Simplified polymorphic_on assignment - [ticket:1895] - - - Flushing of Orphans that have no parent is allowed - [ticket:1912] - - - Warnings generated when collection members, scalar referents - not part of the flush - [ticket:1973] - - - Non-`Table`-derived constructs can be mapped - [ticket:1876] - - - Tuple label names in Query Improved - [ticket:1942] - - - Mapped column attributes reference the most specific - column first - [ticket:1892] - - - Mapping to joins with two or more same-named columns - requires explicit declaration - [ticket:1896] - - - Mapper requires that polymorphic_on column be present - in the mapped selectable - [ticket:1875] - - - compile_mappers() renamed configure_mappers(), simplified - configuration internals - [ticket:1966] - - - the aliased() function, if passed a SQL FromClause element - (i.e. not a mapped class), will return element.alias() - instead of raising an error on AliasedClass. [ticket:2018] - - - Session.merge() will check the version id of the incoming - state against that of the database, assuming the mapping - uses version ids and incoming state has a version_id - assigned, and raise StaleDataError if they don't - match. [ticket:2027] - - - Session.connection(), Session.execute() accept 'bind', - to allow execute/connection operations to participate - in the open transaction of an engine explicitly. - [ticket:1996] - - - Query.join(), Query.outerjoin(), eagerload(), - eagerload_all(), others no longer allow lists - of attributes as arguments (i.e. option([x, y, z]) - form, deprecated since 0.5) - - - ScopedSession.mapper is removed (deprecated since 0.5). - - - Horizontal shard query places 'shard_id' in - context.attributes where it's accessible by the - "load()" event. [ticket:2031] - +0.6.7 +===== - sql - - LIMIT/OFFSET clauses now use bind parameters - [ticket:805] - - - TypeDecorator works with primary key columns - [ticket:2005] [ticket:2006] - - - DDL() constructs now escape percent signs - [ticket:1897] - - - Table.c / MetaData.tables refined a bit, don't allow direct - mutation [ticket:1893] [ticket:1917] - - - Callables passed to `bindparam()` don't get evaluated - [ticket:1950] - - - types.type_map is now private, types._type_map - [ticket:1870] - - - Non-public Pool methods underscored - [ticket:1982] - - - Added NULLS FIRST and NULLS LAST support. It's implemented - as an extension to the asc() and desc() operators, called - nullsfirst() and nullslast(). [ticket:723] - - - The Index() construct can be created inline with a Table - definition, using strings as column names, as an alternative - to the creation of the index outside of the Table. - - - execution_options() on Connection accepts - "isolation_level" argument, sets transaction isolation - level for that connection only until returned to the - connection pool, for thsoe backends which support it - (SQLite, Postgresql) [ticket:2001] - - - A TypeDecorator of Integer can be used with a primary key - column, and the "autoincrement" feature of various dialects - as well as the "sqlite_autoincrement" flag will honor - the underlying database type as being Integer-based. - [ticket:2005] - - - Established consistency when server_default is present - on an Integer PK column. SQLA doesn't pre-fetch these, - nor do they come back in cursor.lastrowid (DBAPI). - Ensured all backends consistently return None - in result.inserted_primary_key for these. Regarding - reflection for this case, reflection of an int PK col - with a server_default sets the "autoincrement" flag to False, - except in the case of a PG SERIAL col where we detected a - sequence default. [ticket:2020] [ticket:2021] - - - Result-row processors are applied to pre-executed SQL - defaults, as well as cursor.lastrowid, when determining - the contents of result.inserted_primary_key. - [ticket:2006] - - - Bind parameters present in the "columns clause" of a select - are now auto-labeled like other "anonymous" clauses, - which among other things allows their "type" to be meaningful - when the row is fetched, as in result row processors. - - - TypeDecorator is present in the "sqlalchemy" import space. - --sqlite - - SQLite dialect now uses `NullPool` for file-based databases - [ticket:1921] - -- mssql - - the String/Unicode types, and their counterparts VARCHAR/ - NVARCHAR, emit "max" as the length when no length is - specified. This makes it more compatible with Postgresql's - VARCHAR type which is similarly unbounded when no length - specified. - -- mysql - - New DBAPI support for pymysql, a pure Python port - of MySQL-python. [ticket:1991] - -- drizzle - - New dialect for Drizzle, a MySQL variant. Uses MySQL-python - for the DBAPI. [ticket:2003] + - Column.copy(), as used in table.tometadata(), copies the + 'doc' attribute. [ticket:2028] 0.6.6 ===== @@ -2002,7 +1837,7 @@ hex identifier string. [ticket:1555] - The visit_pool() method of Dialect is removed, and replaced with - connect(). This method returns a callable which receives + on_connect(). This method returns a callable which receives the raw DBAPI connection after each one is created. The callable is assembled into a first_connect/connect pool listener by the connection strategy if non-None. Provides a simpler interface @@ -4855,8 +4690,8 @@ joined-table inheritance subclasses, using explicit join criteria (i.e. not on a relation). - - @orm.attributes.reconstitute and - MapperExtension.reconstitute have been renamed to + - @orm.attributes.on_reconstitute and + MapperExtension.on_reconstitute have been renamed to @orm.reconstructor and MapperExtension.reconstruct_instance - Fixed @reconstructor hook for subclasses which inherit from a diff -r 586a55fdf15f -r 6b7ae2ab9a29 LICENSE --- a/LICENSE Wed Jan 26 11:50:00 2011 -0500 +++ b/LICENSE Sun Jan 30 13:11:50 2011 -0500 @@ -1,6 +1,6 @@ This is the MIT license: http://www.opensource.org/licenses/mit-license.php -Copyright (c) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>. +Copyright (c) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>. SQLAlchemy is a trademark of Michael Bayer. Permission is hereby granted, free of charge, to any person obtaining a copy of this diff -r 586a55fdf15f -r 6b7ae2ab9a29 README.py3k --- a/README.py3k Wed Jan 26 11:50:00 2011 -0500 +++ b/README.py3k Sun Jan 30 13:11:50 2011 -0500 @@ -39,9 +39,17 @@ Running Tests ------------- -To run unit tests in Py3k, Nose 1.0 is required, or a development -version of Nose that supports Python 3. The tests are run -using ./sqla_nose.py as described in README.unittests. +To run the unit tests, ensure Distribute is installed as above, +and also that at least the ./lib/ and ./test/ directories have been converted +to Python 3 using the source tool above. A Python 3 version of Nose +can be acquired from Bitbucket using Mercurial: + + hg clone http://bitbucket.org/jpellerin/nose3/ + cd nose3 + python3 setup.py install + +The tests can then be run using the "nosetests3" script installed by the above, +using the same instructions in README.unittests. Current 3k Issues ----------------- diff -r 586a55fdf15f -r 6b7ae2ab9a29 README.unittests --- a/README.unittests Wed Jan 26 11:50:00 2011 -0500 +++ b/README.unittests Sun Jan 30 13:11:50 2011 -0500 @@ -5,37 +5,59 @@ SQLAlchemy unit tests by default run using Python's built-in sqlite3 module. If running on Python 2.4, pysqlite must be installed. -Unit tests are run using nose. Nose is available at: +Unit tests are run using nose. Note that in most cases, +nose needs to be installed manually. Documentation and +downloads for nose are available at: - http://pypi.python.org/pypi/nose/ +http://somethingaboutorange.com/mrl/projects/nose/0.11.1/index.html + +Or using setuptools: + + $ easy_install nose SQLAlchemy implements a nose plugin that must be present when tests are run. -This plugin is invoked when the test runner script provided with -SQLAlchemy is used. +This plugin is available when SQLAlchemy is installed via setuptools. -**NOTE:** - the nose plugin is no longer installed by setuptools as of -version 0.7 ! Use "python setup.py test" or "./sqla_nose.py". +INSTANT TEST RUNNER +------------------- -RUNNING TESTS VIA SETUP.PY --------------------------- A plain vanilla run of all tests using sqlite can be run via setup.py: $ python setup.py test -The -v flag also works here: +(NOTE: this command is broken for Python 2.7 with nose 0.11.3, see +Nose issue 340. You will need to use 'nosetests' directly, see below.) - $ python setup.py test -v +Setuptools will take care of the rest ! To run nose directly and have +its full set of options available, read on... |