File: test_global_registry.py

package info (click to toggle)
python-calendra 7.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,600 kB
  • sloc: python: 16,840; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 503 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from unittest import TestCase

from ..registry import registry


class GlobalRegistry(TestCase):

    def test_name(self):
        for klass in registry.region_registry.values():
            # All classes have a `name` class property
            self.assertTrue(hasattr(klass, 'name'))
            # All classes have a non-empty name
            self.assertTrue(klass.name)
            # All those properties are equivalent to the class docstring
            self.assertEqual(klass.name, klass.__doc__)