diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-02 15:10:32 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-16 16:20:18 -0400 |
| commit | 01a0a2d542909456a28fba8e6f16c0e0346e1278 (patch) | |
| tree | 6539a2ded845c16edc002c8c952e6be57f72b5b0 /lib/sqlalchemy/testing/requirements.py | |
| parent | 65d8deac95b63ea5702a9ce6b5d9a6c9a6a60991 (diff) | |
| download | sqlalchemy-01a0a2d542909456a28fba8e6f16c0e0346e1278.tar.gz | |
Additions to support HAAlchemy plugin
- add a connect=True key to connection record to support
pre-loading of _ConnectionRecord objects
- ensure _ConnectionRecord.close() leaves the record in a good
state for reopening
- add _ConnectionRecord.record_info for persistent storage
- add "in_use" accessor based on fairy_ref being present or not
- allow for the exclusions system and SuiteRequirements to be
usable without the full plugin_base setup.
- move some Python-env requirements to the importable
requirements.py module.
- allow starttime to be queried
- add additional events for engine plugins
- have "dialect" be a first-class parameter to the pool,
ensure the engine strategy supplies it up front
Change-Id: Ibf549f7a1766e49d335cd6f5e26bacfaef9a8229
Diffstat (limited to 'lib/sqlalchemy/testing/requirements.py')
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index a9370a30e..b0f466892 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -15,6 +15,8 @@ to provide specific inclusion/exclusions. """ +import sys + from . import exclusions from .. import util @@ -708,6 +710,44 @@ class SuiteRequirements(Requirements): ) @property + def python2(self): + return exclusions.skip_if( + lambda: sys.version_info >= (3,), + "Python version 2.xx is required." + ) + + @property + def python3(self): + return exclusions.skip_if( + lambda: sys.version_info < (3,), + "Python version 3.xx is required." + ) + + @property + def cpython(self): + return exclusions.only_if( + lambda: util.cpython, + "cPython interpreter needed" + ) + + @property + def non_broken_pickle(self): + from sqlalchemy.util import pickle + return exclusions.only_if( + lambda: not util.pypy and pickle.__name__ == 'cPickle' + or sys.version_info >= (3, 2), + "Needs cPickle+cPython or newer Python 3 pickle" + ) + + @property + def predictable_gc(self): + """target platform must remove all cycles unconditionally when + gc.collect() is called, as well as clean out unreferenced subclasses. + + """ + return self.cpython + + @property def no_coverage(self): """Test should be skipped if coverage is enabled. |
