diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-05-23 12:59:53 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-05-23 12:59:53 -0400 |
| commit | 2eaae08f4845460f27c7bb96f5b26d31f35b0e77 (patch) | |
| tree | 5419ae3ad446c066bb9b54f8b0643bc4335f7f00 /test/base | |
| parent | cfb0f9ca14f82c9ba06c4d5cbc992f821eb2234e (diff) | |
| download | sqlalchemy-2eaae08f4845460f27c7bb96f5b26d31f35b0e77.tar.gz | |
Fixed a bug where the routine to detect the correct kwargs
being sent to :func:`.create_engine` would fail in some cases,
such as with the Sybase dialect.
[ticket:2732]
Diffstat (limited to 'test/base')
| -rw-r--r-- | test/base/test_utils.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/test/base/test_utils.py b/test/base/test_utils.py index af881af17..b28d26e71 100644 --- a/test/base/test_utils.py +++ b/test/base/test_utils.py @@ -1084,6 +1084,10 @@ class ArgInspectionTest(fixtures.TestBase): def __init__(self, b1, **kw): pass + class B2(B): + def __init__(self, b2): + pass + class AB(A, B): def __init__(self, ab): pass @@ -1101,15 +1105,27 @@ class ArgInspectionTest(fixtures.TestBase): class CBA(B, A): pass + class CB1A1(B1, A1): + pass + class CAB1(A, B1): pass class CB1A(B1, A): pass + class CB2A(B2, A): + pass + class D(object): pass + class BA2(B, A): + pass + + class A11B1(A11, B1): + pass + def test(cls, *expected): eq_(set(util.get_cls_kwargs(cls)), set(expected)) @@ -1122,10 +1138,14 @@ class ArgInspectionTest(fixtures.TestBase): test(BA, 'ba', 'b', 'a') test(BA1, 'ba', 'b', 'a') test(CAB, 'a') - test(CBA, 'b') + test(CBA, 'b', 'a') test(CAB1, 'a') - test(CB1A, 'b1', 'b') + test(CB1A, 'b1', 'b', 'a') + test(CB2A, 'b2') + test(CB1A1, "a1", "b1", "b") test(D) + test(BA2, "a", "b") + test(A11B1, "a1", "a11", "b", "b1") def test_get_func_kwargs(self): |
