hospital provides a set of health check suites you can customize.


Healthchecks related to Python packaging.

class hospital.healthchecks.packaging.DistributionHealthCheck(methodName='runTest')


Several checks related to project’s distribution.

The simplest way to reuse this healthcheck is to inherit from it and customize the distribution_name attribute.

distribution_name = 'hospital'

Distribution name. This is a class attribute in order to share it between test methods.

distribution = None

Distribution instance. This is a class attribute in order to share it between test methods. It is to be populated by get_distribution() during setup.


Return distribution instance from distribution_name.


Setup distribution.


Make sure project runs on supported Python version.

This healthcheck focuses on compatibility of project within environments that actually use it, whereas unit tests take care of:

  • supported Python versions declaration (, setup.cfg).
  • project was developed within supported environment(s).
is_healthcheck = True


Predictable health checks, i.e. they always have the expected behaviour.

class hospital.healthchecks.predictable.ForeverPassingHealthCheck(methodName='runTest')


Health check that forever passes.

Useful to check that health checks can be run, discovered, or to check their output.

As an example, once you have setup your environment, you should be able to collect this health check and run it sucessfully, or it would mean there is something wrong with your setup... Configuration of health check discovery could be the cause.


Health checks are collected.

is_healthcheck = True
class hospital.healthchecks.predictable.ForeverSkippedHealthCheck(methodName='runTest')


Healthcheck that is always skipped.


Health checks can be skipped.

is_healthcheck = True