test the echo flag's independence to a specific engine.
(self)
| 1106 | eq_(e1.logger.getEffectiveLevel(), logging.WARNING) |
| 1107 | |
| 1108 | def test_echo_flag_independence(self): |
| 1109 | """test the echo flag's independence to a specific engine.""" |
| 1110 | |
| 1111 | e1 = self._testing_engine() |
| 1112 | e2 = self._testing_engine() |
| 1113 | |
| 1114 | e1.echo = True |
| 1115 | |
| 1116 | with e1.begin() as conn: |
| 1117 | conn.execute(select(1)).close() |
| 1118 | |
| 1119 | with e2.begin() as conn: |
| 1120 | conn.execute(select(2)).close() |
| 1121 | |
| 1122 | e1.echo = False |
| 1123 | |
| 1124 | with e1.begin() as conn: |
| 1125 | conn.execute(select(3)).close() |
| 1126 | with e2.begin() as conn: |
| 1127 | conn.execute(select(4)).close() |
| 1128 | |
| 1129 | e2.echo = True |
| 1130 | with e1.begin() as conn: |
| 1131 | conn.execute(select(5)).close() |
| 1132 | with e2.begin() as conn: |
| 1133 | conn.execute(select(6)).close() |
| 1134 | |
| 1135 | assert self.buf.buffer[1].getMessage().startswith("SELECT 1") |
| 1136 | |
| 1137 | assert self.buf.buffer[5].getMessage().startswith("SELECT 6") |
| 1138 | assert len(self.buf.buffer) == 8 |
| 1139 | |
| 1140 | |
| 1141 | class RowLoggingTest(fixtures.TablesTest): |
nothing calls this directly
no test coverage detected