コード例 #1
0
    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
コード例 #2
0
    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
コード例 #3
0
 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)