test that connection pool args make it thru
(self)
| 832 | assert repr(e2) == "Engine(mysql+mysqldb://scott:***@localhost/test)" |
| 833 | |
| 834 | def test_poolargs(self): |
| 835 | """test that connection pool args make it thru""" |
| 836 | |
| 837 | e = create_engine( |
| 838 | "postgresql+psycopg2://", |
| 839 | creator=None, |
| 840 | pool_recycle=50, |
| 841 | echo_pool=None, |
| 842 | module=mock_dbapi, |
| 843 | _initialize=False, |
| 844 | ) |
| 845 | assert e.pool._recycle == 50 |
| 846 | |
| 847 | # these args work for QueuePool |
| 848 | |
| 849 | e = create_engine( |
| 850 | "postgresql+psycopg2://", |
| 851 | max_overflow=8, |
| 852 | pool_timeout=60, |
| 853 | poolclass=tsa.pool.QueuePool, |
| 854 | module=mock_dbapi, |
| 855 | _initialize=False, |
| 856 | ) |
| 857 | |
| 858 | # but not SingletonThreadPool |
| 859 | |
| 860 | assert_raises( |
| 861 | TypeError, |
| 862 | create_engine, |
| 863 | "sqlite://", |
| 864 | max_overflow=8, |
| 865 | pool_timeout=60, |
| 866 | poolclass=tsa.pool.SingletonThreadPool, |
| 867 | module=mock_sqlite_dbapi, |
| 868 | _initialize=False, |
| 869 | ) |
| 870 | |
| 871 | @testing.combinations(True, False) |
| 872 | def test_password_object_str(self, creator): |
nothing calls this directly
no test coverage detected