python-hospital / hospital

Tools to diagnose Python projects (supervision, monitoring).
Other
40 stars 8 forks source link

Use @healthcheck decorator instead of HealthCheck class #14

Closed benoitbryon closed 10 years ago

benoitbryon commented 10 years ago

Using a decorator makes it easier to write health checks: you can decorate functions or classes, you can inherit from various TestCase classes (unittest, django.test, ...).

The HealthCheck class becomes a unittest.TestCase decorated with @healthcheck.