def test(pre=None, post=None):
	"""Decorator to execute tests and print useful information
		The method being tested must have an <assert>
		pre is a function without arguments to execute before the test starts
		post is a function without arguments to execute after the test has finished
	"""
	def inner(func):
		def wrap(*args, **kwargs):
			if pre:
				pre()

			print(func.__name__,":", end="")
			try:
				func()
				print("OK!")
			except AssertionError:
				print("ASSERTION ERROR!")
			except Exception as exc:
				print("ERROR!", exc)
				
			if post:
				post()
		return wrap
	return inner