diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-02-05 09:03:08 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-02-05 09:03:08 -0500 |
| commit | 00570a6ac9453a48b06ca094de6e0502c3b73fa5 (patch) | |
| tree | 83145d533ffce6ed5f14836c2c228eeeafba10fe /test/dialect/test_all.py | |
| parent | 56ff3c5270b4393c1ae800756f3619583a0fb255 (diff) | |
| download | sqlalchemy-00570a6ac9453a48b06ca094de6e0502c3b73fa5.tar.gz | |
Convert dialect modules to relative imports and test
For some reason the dialects were not consistently
converted to relative imports. Also added a test to
ensure that __all__ is functioning within each dialect.
Change-Id: I8450ed724473be7e17678e9aba7ba0f661fdf134
Diffstat (limited to 'test/dialect/test_all.py')
| -rw-r--r-- | test/dialect/test_all.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/dialect/test_all.py b/test/dialect/test_all.py new file mode 100644 index 000000000..3e028e87a --- /dev/null +++ b/test/dialect/test_all.py @@ -0,0 +1,18 @@ +from sqlalchemy.testing import fixtures +from sqlalchemy.testing import is_not_ +from sqlalchemy import dialects + + +class ImportStarTest(fixtures.TestBase): + + def _all_dialect_packages(self): + return [ + getattr(__import__("sqlalchemy.dialects.%s" % d).dialects, d) + for d in dialects.__all__ + if not d.startswith('_') + ] + + def test_all_import(self): + for package in self._all_dialect_packages(): + for item_name in package.__all__: + is_not_(None, getattr(package, item_name)) |
