|
| ExistentModulePaths = Path(find_file("skim/scripts/skim")).glob("*.py") |
|
list | ExistentModules |
|
Test case for skim registry.
Definition at line 16 of file test_registry.py.
◆ assertIsSubclass()
def assertIsSubclass |
( |
|
self, |
|
|
|
cls, |
|
|
|
parent_cls, |
|
|
|
msg = None |
|
) |
| |
Fail if `cls` is not a subclass of `parent_cls`.
Definition at line 26 of file test_registry.py.
26 def assertIsSubclass(self, cls, parent_cls, msg=None):
27 """Fail if `cls` is not a subclass of `parent_cls`."""
28 if not issubclass(cls, parent_cls):
29 standardMsg =
"%r is not a subclass of %r" % (cls, parent_cls)
30 self.fail(self._formatMessage(msg, standardMsg))
◆ test_clashing_skim_and_module_names()
def test_clashing_skim_and_module_names |
( |
|
self | ) |
|
Check that there is no overlap between skim and module names.
Definition at line 84 of file test_registry.py.
◆ test_code_format()
def test_code_format |
( |
|
self | ) |
|
Check the codes are the correct format (8 digits).
Definition at line 32 of file test_registry.py.
◆ test_decode()
Check that we raise a LookupError if the skim code doesn't exist.
Definition at line 67 of file test_registry.py.
◆ test_encode()
Check that we raise a LookupError if the skim name doesn't exist.
Definition at line 62 of file test_registry.py.
◆ test_invalid_names()
def test_invalid_names |
( |
|
self | ) |
|
Check that that no registered skims have invalid names.
Definition at line 51 of file test_registry.py.
◆ test_modules_exist()
def test_modules_exist |
( |
|
self | ) |
|
Check that all modules listed in registry exist in skim/scripts/skim/.
Definition at line 72 of file test_registry.py.
◆ test_skims_exist()
def test_skims_exist |
( |
|
self | ) |
|
Check that the registry is correct about the location of every skim.
This test uses the information from the registry, and checks for missing skims
in the modules.
Definition at line 91 of file test_registry.py.
◆ test_undocumented_skims()
def test_undocumented_skims |
( |
|
self | ) |
|
Check that every skim defined in a module is listed in the registry.
This test uses the information from the modules, and checks for missing or
incorrect skim information in the registry.
Definition at line 118 of file test_registry.py.
◆ test_unique_codes()
def test_unique_codes |
( |
|
self | ) |
|
Check that there aren't two skims registered with the same code.
Definition at line 39 of file test_registry.py.
◆ test_unique_names()
def test_unique_names |
( |
|
self | ) |
|
Check that there aren't two skims registered with the same name.
Definition at line 45 of file test_registry.py.
◆ ExistentModules
Initial value:= [
module.stem
for module in ExistentModulePaths
if module.stem not in ["__init__", "registry"]
]
Definition at line 20 of file test_registry.py.
The documentation for this class was generated from the following file: