From b1f8d46fca951467ce0c05fe648f9f34de95c2ed Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 12 Apr 2017 15:15:16 -0400 Subject: [PATCH] - move a few memusage tests out of "backend". something is up w/ cx_Oracle when the suite runs, such as a background thread or something like that, which is affecting these tests a bit. Change-Id: I52d50a44778ec1eecb8e335ae59b1a4773e80a79 --- test/aaa_profiling/test_memusage.py | 65 ++++++++++++++++------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py index 5e0baabefe..da9103bcf0 100644 --- a/test/aaa_profiling/test_memusage.py +++ b/test/aaa_profiling/test_memusage.py @@ -113,6 +113,41 @@ class EnsureZeroed(fixtures.ORMTest): class MemUsageTest(EnsureZeroed): + __tags__ = 'memory_intensive', + __requires__ = 'cpython', + + def test_type_compile(self): + from sqlalchemy.dialects.sqlite.base import dialect as SQLiteDialect + cast = sa.cast(column('x'), sa.Integer) + + @profile_memory() + def go(): + dialect = SQLiteDialect() + cast.compile(dialect=dialect) + go() + + @testing.requires.cextensions + def test_DecimalResultProcessor_init(self): + @profile_memory() + def go(): + to_decimal_processor_factory({}, 10) + go() + + @testing.requires.cextensions + def test_DecimalResultProcessor_process(self): + @profile_memory() + def go(): + to_decimal_processor_factory(decimal.Decimal, 10)(1.2) + go() + + @testing.requires.cextensions + def test_UnicodeResultProcessor_init(self): + @profile_memory() + def go(): + to_unicode_processor_factory('utf8') + go() + +class MemUsageWBackendTest(EnsureZeroed): __tags__ = 'memory_intensive', __requires__ = 'cpython', @@ -769,33 +804,3 @@ class MemUsageTest(EnsureZeroed): finally: metadata.drop_all() - def test_type_compile(self): - from sqlalchemy.dialects.sqlite.base import dialect as SQLiteDialect - cast = sa.cast(column('x'), sa.Integer) - - @profile_memory() - def go(): - dialect = SQLiteDialect() - cast.compile(dialect=dialect) - go() - - @testing.requires.cextensions - def test_DecimalResultProcessor_init(self): - @profile_memory() - def go(): - to_decimal_processor_factory({}, 10) - go() - - @testing.requires.cextensions - def test_DecimalResultProcessor_process(self): - @profile_memory() - def go(): - to_decimal_processor_factory(decimal.Decimal, 10)(1.2) - go() - - @testing.requires.cextensions - def test_UnicodeResultProcessor_init(self): - @profile_memory() - def go(): - to_unicode_processor_factory('utf8') - go() -- 2.47.3