Belle II Software  release-06-01-15
TestSkimRegistry Class Reference
Inheritance diagram for TestSkimRegistry:
Collaboration diagram for TestSkimRegistry:

Public Member Functions

def assertIsSubclass (self, cls, parent_cls, msg=None)
 
def test_code_format (self)
 
def test_unique_codes (self)
 
def test_unique_names (self)
 
def test_invalid_names (self)
 
def test_encode (self)
 
def test_decode (self)
 
def test_modules_exist (self)
 
def test_clashing_skim_and_module_names (self)
 
def test_skims_exist (self)
 
def test_undocumented_skims (self)
 

Static Public Attributes

 ExistentModulePaths = Path(find_file("skim/scripts/skim/WGs")).glob("*.py")
 
list ExistentModules
 

Detailed Description

Test case for skim registry.

Definition at line 28 of file test_skim_framework.py.

Member Function Documentation

◆ assertIsSubclass()

def assertIsSubclass (   self,
  cls,
  parent_cls,
  msg = None 
)
Fail if `cls` is not a subclass of `parent_cls`.

Definition at line 38 of file test_skim_framework.py.

38  def assertIsSubclass(self, cls, parent_cls, msg=None):
39  """Fail if `cls` is not a subclass of `parent_cls`."""
40  if not issubclass(cls, parent_cls):
41  standardMsg = "%r is not a subclass of %r" % (cls, parent_cls)
42  self.fail(self._formatMessage(msg, standardMsg))
43 

◆ 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 96 of file test_skim_framework.py.

◆ test_code_format()

def test_code_format (   self)
Check the codes are the correct format (8 digits).

Definition at line 44 of file test_skim_framework.py.

◆ test_decode()

def test_decode (   self)
Check that we raise a LookupError if the skim code doesn't exist.

Definition at line 79 of file test_skim_framework.py.

◆ test_encode()

def test_encode (   self)
Check that we raise a LookupError if the skim name doesn't exist.

Definition at line 74 of file test_skim_framework.py.

◆ test_invalid_names()

def test_invalid_names (   self)
Check that that no registered skims have invalid names.

Definition at line 63 of file test_skim_framework.py.

◆ test_modules_exist()

def test_modules_exist (   self)
Check that all modules listed in registry exist in skim/scripts/skim/.

Definition at line 84 of file test_skim_framework.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 105 of file test_skim_framework.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 132 of file test_skim_framework.py.

◆ test_unique_codes()

def test_unique_codes (   self)
Check that there aren't two skims registered with the same code.

Definition at line 51 of file test_skim_framework.py.

◆ test_unique_names()

def test_unique_names (   self)
Check that there aren't two skims registered with the same name.

Definition at line 57 of file test_skim_framework.py.

Member Data Documentation

◆ ExistentModules

list ExistentModules
static
Initial value:
= [
module.stem
for module in ExistentModulePaths
if module.stem not in ["__init__", "registry"]
]

Definition at line 32 of file test_skim_framework.py.


The documentation for this class was generated from the following file: