def test_cgdt_columns_number(self):
        loaded_data = load_json(_CGDT_DEFAULT_PATH)[0]

        try:
            assert len(loaded_data) == len(CGDTCharacter.DB_TABLE),\
                'CGDTCharacter.DB_TABLE lens {0}, but loaded data has {1} columns.'.format(
                    len(CGDTCharacter.DB_TABLE), len(loaded_data))
        except AssertionError as e:
            for i in range(len(CGDTCharacter.DB_TABLE)):
                print CGDTCharacter.DB_TABLE[i], ': ', loaded_data[i]
            raise e
    def test_cgdt_columns_number(self):
        loaded_data = load_json(_CGDT_DEFAULT_PATH)[0]

        try:
            assert len(loaded_data) == len(CGDTCharacter.DB_TABLE),\
                'CGDTCharacter.DB_TABLE lens {0}, but loaded data has {1} columns.'.format(
                    len(CGDTCharacter.DB_TABLE), len(loaded_data))
        except AssertionError as e:
            for i in range(len(CGDTCharacter.DB_TABLE)):
                print CGDTCharacter.DB_TABLE[i], ': ', loaded_data[i]
            raise e
 def __init__(self, file_path=_CGDT_DEFAULT_PATH):
     self.data = load_json(file_path)
示例#4
0
 def __init__(self, path):
     self.path = path
     self.data = load_json(self.path)
示例#5
0
 def __init__(self, file_path=_CGDT_DEFAULT_PATH):
     self.data = load_json(file_path)