Commit da2f20a7 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Remove unneeded typing fudge in mysql.py

parent 45d4ded3
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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)