blob: ca4d1ad5b874d0a62b50bba523a595f4882ea1af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import yatest.common
import json
import os
DATA_PATH = yatest.common.source_path('yql/essentials/data/language')
TOOL_PATH = yatest.common.binary_path('yql/essentials/tools/sql_functions_dump/sql_functions_dump')
def test_functions_dump():
with open(os.path.join(DATA_PATH, "sql_functions.json")) as f:
func_from_file = json.load(f)
res = yatest.common.execute(
[TOOL_PATH],
check_exit_code=True,
wait=True
)
func_from_tool = json.loads(res.stdout)
assert func_from_tool == func_from_file, 'JSON_DIFFER\n' \
'File:\n %(func_from_file)s\n\n' \
'Tool:\n %(func_from_tool)s\n' % locals()
|