EdgyNortal
EdgyNortal
watson.log ``` Friday 15 July 2022 (01m 52s) 20e3e32 15:51 to 15:53 01m 28s Привет current 15:53 to 15:53 24s Привет ``` watson.aggregate ``` Fri 15 July 2022 - 02m...
https://github.com/dense-analysis/ale/pull/4632/files
``` @property def _connection(self) -> "Connection": # Returns the same connection if called multiple times return self._connection_callable() ``` It would appear, this isn't entirely true or behaving as expected?
``` def transaction( self, *, force_rollback: bool = False, **kwargs: typing.Any ) -> "Transaction": def connection_callable() -> Connection: return self return Transaction(connection_callable, force_rollback, **kwargs) ``` Based on the instantiation of...
The transaction `self` object is the same on both side of enter/exit, and repeated calls to `connection_callable` in `__aenter__` does indeed return the same connection. Just on `__aexit__` the connection_callable...
``` import databases @pytest.fixture(scope="session") def db(config): return databases.Database(config.postgres_dsn) @pytest.fixture() async def transaction(db): await db.connect() t = await db.transaction() print(t._connection) try: yield db finally: print(t._connection) await t.rollback() async def test_example(transaction): await...