From: Mike Bayer Date: Sat, 29 Sep 2012 20:30:57 +0000 (-0400) Subject: this isnt used X-Git-Tag: rel_0_8_0b1~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a4121e8e824ec625539765fcd5a05ad5eba37e5;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git this isnt used --- diff --git a/test/ex/__init__.py b/test/ex/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/ex/test_examples.py b/test/ex/test_examples.py deleted file mode 100644 index 3182b5ab5a..0000000000 --- a/test/ex/test_examples.py +++ /dev/null @@ -1,58 +0,0 @@ -from sqlalchemy.testing import * -import os -import re - - -def find_py_files(dirs): - for dn in dirs: - dn = os.path.abspath(dn) - for root, dirs, files in os.walk(dn): - for r in '.svn', 'CVS', '.git', '.hg': - try: - dirs.remove(r) - except ValueError: - pass - pyfiles = [fn for fn in files if fn.endswith('.py')] - if not pyfiles: - continue - - # Find the root of the packages. - - packroot = root - while 1: - if not os.path.exists(os.path.join(packroot, - '__init__.py')): - break - packroot = os.path.dirname(packroot) - for fn in pyfiles: - yield os.path.join(root[len(packroot) + 1:], fn) - - -def filename_to_module_name(fn): - if os.path.basename(fn) == '__init__.py': - fn = os.path.dirname(fn) - return re.sub('\.py$', '', fn.replace(os.sep, '.')) - - -def find_modules(*args): - for fn in find_py_files(args or ('./examples', )): - yield filename_to_module_name(fn) - - -def check_import(module): - __import__(module) - - -class ExamplesTest(fixtures.TestBase): - - # TODO: ensure examples are actually run regardless of check for - # "__main__", perhaps standardizing the format of all examples. - # ensure that examples with external dependencies are not run if - # those dependencies are not present (i.e. elementtree, postgis) - - def test_examples(self): - pass - - - # for module in find_modules(): check_import.description = - # module yield check_import, module