Loading behave_utils/mysql.py +1 −3 Original line number Diff line number Diff line Loading @@ -112,15 +112,13 @@ class Mysql(Container): @fixture def snapshot_rollback(context: FeatureContext, /, database: Mysql|None = None) -> Iterator[None]: def snapshot_rollback(context: FeatureContext, /, database: Mysql) -> Iterator[None]: """ Manage the state of a database as a revertible fixture At the end of the fixture's lifetime it's state at the beginning is restored. This allows for faster fixture turn-around than restarting the database. """ assert database is not None, \ "'database' is required for snapshot_rollback" snapshot = database.mysqldump("--all-databases", deserialiser=bytes) yield database.mysql(input=snapshot) Loading
behave_utils/mysql.py +1 −3 Original line number Diff line number Diff line Loading @@ -112,15 +112,13 @@ class Mysql(Container): @fixture def snapshot_rollback(context: FeatureContext, /, database: Mysql|None = None) -> Iterator[None]: def snapshot_rollback(context: FeatureContext, /, database: Mysql) -> Iterator[None]: """ Manage the state of a database as a revertible fixture At the end of the fixture's lifetime it's state at the beginning is restored. This allows for faster fixture turn-around than restarting the database. """ assert database is not None, \ "'database' is required for snapshot_rollback" snapshot = database.mysqldump("--all-databases", deserialiser=bytes) yield database.mysql(input=snapshot)