22#
33import yatest
44import pytest
5- from ydb .tests .library .common import yatest_common
65
76import json
87import logging
1514
1615def bin_from_env (name ):
1716 if os .getenv (name ):
18- return yatest_common .binary_path (os .getenv (name ))
17+ return yatest . common .binary_path (os .getenv (name ))
1918 raise RuntimeError (f'{ name } enviroment variable is not specified' )
2019
2120
@@ -35,7 +34,7 @@ class TestYamlConfigTransformations(object):
3534 @classmethod
3635 def execute (cls , binary , stdin = None , args = []):
3736 try :
38- execution = yatest_common .execute (
37+ execution = yatest . common .execute (
3938 [binary ] + args ,
4039 stdin = stdin ,
4140 )
@@ -50,7 +49,7 @@ def canonical_result(output_result, filename, out_path):
5049 result_path = os .path .join (out_path , result_filename )
5150 with open (result_path , "w" ) as f :
5251 f .write (output_result )
53- return yatest_common .canonical_file (str (result_path ), diff_tool = json_diff_bin (), local = True , universal_lines = True )
52+ return yatest . common .canonical_file (str (result_path ), diff_tool = json_diff_bin (), local = True , universal_lines = True )
5453
5554 def cleanup_errors (self , errors ):
5655 return re .sub (r'address -> 0x[a-zA-Z0-9]+' , 'address -> REDACTED' , errors )
@@ -65,7 +64,7 @@ def execute_test(self, data, binary, args=[]):
6564 success , result = self .execute (stdin = f , binary = binary , args = args )
6665 if not success :
6766 result = json .dumps ({"error" : True , "stderr" : self .cleanup_errors (result )})
68- results [entry .name ] = self .canonical_result (result , entry .name , yatest_common .output_path ())
67+ results [entry .name ] = self .canonical_result (result , entry .name , yatest . common .output_path ())
6968 return [results [key ] for key in sorted (results .keys (), reverse = True )]
7069
7170 @pytest .mark .parametrize ('binary' , [('dump' , dump_bin ()), ('dump_ds_init' , dump_ds_init_bin ())], ids = lambda binary : binary [0 ])
0 commit comments