MCPcopy
hub / github.com/geldata/gel / assertRaisesRegexTx

Method assertRaisesRegexTx

edb/testbase/server.py:916–926  ·  view source on GitHub ↗

A version of assertRaisesRegex with automatic transaction recovery

(self, exception, regex, msg=None, **kwargs)

Source from the content-addressed store, hash-verified

914
915 @contextlib.asynccontextmanager
916 async def assertRaisesRegexTx(self, exception, regex, msg=None, **kwargs):
917 """A version of assertRaisesRegex with automatic transaction recovery
918 """
919
920 with super().assertRaisesRegex(exception, regex, msg=msg, **kwargs):
921 try:
922 tx = self.con.transaction()
923 await tx.start()
924 yield
925 finally:
926 await tx.rollback()
927
928 @classmethod
929 @contextlib.contextmanager

Calls 4

transactionMethod · 0.80
rollbackMethod · 0.80
assertRaisesRegexMethod · 0.45
startMethod · 0.45