From 4663ec98b226a7d495846f0d89c646110705bb30 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 20 Oct 2013 16:59:56 -0400 Subject: - The typing system now handles the task of rendering "literal bind" values, 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 --- lib/sqlalchemy/testing/requirements.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index d301dc69f..7dc6ea40b 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -295,6 +295,15 @@ class SuiteRequirements(Requirements): """Target driver must support some degree of non-ascii symbol names.""" return exclusions.closed() + @property + def datetime_literals(self): + """target dialect supports rendering of a date, time, or datetime as a + literal string, e.g. via the TypeEngine.literal_processor() method. + + """ + + return exclusions.closed() + @property def datetime(self): """target dialect supports representation of Python -- cgit v1.2.1 From 42f2a16be7ff462048857799decc41a95c459fc3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 26 Oct 2013 16:32:17 -0400 Subject: - add copyright to source files missing it --- lib/sqlalchemy/testing/requirements.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 7dc6ea40b..408c3705e 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -1,3 +1,9 @@ +# testing/requirements.py +# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors +# +# This module is part of SQLAlchemy and is released under +# the MIT License: http://www.opensource.org/licenses/mit-license.php + """Global database feature support policy. Provides decorators to mark tests requiring specific feature support from the -- cgit v1.2.1 From 6b79d2ea7951abc2bb6083b541db0fbf71590dd3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 22 Nov 2013 20:04:19 -0500 Subject: - The precision used when coercing a returned floating point value to 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] --- lib/sqlalchemy/testing/requirements.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 408c3705e..e48fa2c00 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -393,6 +393,14 @@ class SuiteRequirements(Requirements): return exclusions.closed() + @property + def precision_generic_float_type(self): + """target backend will return native floating point numbers with at + least seven decimal places when using the generic Float type. + + """ + return exclusions.open() + @property def floats_to_four_decimals(self): """target backend can return a floating-point number with four -- cgit v1.2.1 From 0cba61d150b84646f8da02cff66e25e9542f92a6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 27 Dec 2013 13:05:32 -0500 Subject: - repair some suite tests for firebird --- lib/sqlalchemy/testing/requirements.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index e48fa2c00..3e48ba026 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -138,6 +138,20 @@ class SuiteRequirements(Requirements): return exclusions.open() + @property + def fetch_rows_post_commit(self): + """target platform will allow cursor.fetchone() to proceed after a + COMMIT. + + Typically this refers to an INSERT statement with RETURNING which + is invoked within "autocommit". If the row can be returned + after the autocommit, then this rule can be open. + + """ + + return exclusions.open() + + @property def empty_inserts(self): """target platform supports INSERT with no values, i.e. -- cgit v1.2.1 From 1eb92e50d9845642940e7ab20906384bebec85fb Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 28 Dec 2013 17:50:19 -0500 Subject: - apply a similar fix for floats to mssql+pyodbc as we did to firebird - wrangle through osx+pyodbc+freetds to get at least test_suite to pass again with mssql+pyodbc. invovled adding some silly requirements --- lib/sqlalchemy/testing/requirements.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 3e48ba026..60e966b3b 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -424,6 +424,16 @@ class SuiteRequirements(Requirements): """ return exclusions.open() + @property + def fetch_null_from_numeric(self): + """target backend doesn't crash when you try to select a NUMERIC + value that has a value of NULL. + + Added to support Pyodbc bug #351. + """ + + return exclusions.open() + @property def text_type(self): """Target database must support an unbounded Text() " -- cgit v1.2.1 From f89d4d216bd7605c920b7b8a10ecde6bfea2238c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 5 Jan 2014 16:57:05 -0500 Subject: - happy new year --- lib/sqlalchemy/testing/requirements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/testing/requirements.py') diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 60e966b3b..706d6d060 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -1,5 +1,5 @@ # testing/requirements.py -# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors +# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -- cgit v1.2.1