mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
FileAPI test: Add infrastructure for reading JSON test data
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
from check_index import *
|
||||
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
|
||||
def read_codemodel_json_data(filename):
|
||||
abs_filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), "codemodel-v2-data", filename)
|
||||
with open(abs_filename, "r") as f:
|
||||
return json.load(f)
|
||||
|
||||
def check_objects(o, g):
|
||||
assert is_list(o)
|
||||
assert len(o) == 1
|
||||
|
||||
Reference in New Issue
Block a user