File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 6
6
import pytest
7
7
8
8
from pydantic2ts import generate_typescript_defs
9
- from pydantic2ts .cli .script import DEBUG , V2 , parse_cli_args
9
+ from pydantic2ts .cli .script import V2 , parse_cli_args
10
10
11
11
version = "v2" if V2 else "v1"
12
12
13
+ DEBUG = os .environ .get ("DEBUG" , False )
14
+
13
15
14
16
def _results_directory () -> str :
15
17
return os .path .join (os .path .dirname (os .path .realpath (__file__ )), "expected_results" )
@@ -38,7 +40,7 @@ def run_test(
38
40
if call_from_python :
39
41
generate_typescript_defs (module_path , output_path , exclude )
40
42
else :
41
- cmd = f"pydantic2ts --module { module_path } --output { output_path } "
43
+ cmd = f"python ../ pydantic2ts/cli/script.py --module { module_path } --output { output_path } --json2ts-cmd \" npx json2ts \" "
42
44
for model_to_exclude in exclude :
43
45
cmd += f" --exclude { model_to_exclude } "
44
46
subprocess .run (cmd , shell = True , check = True )
You can’t perform that action at this time.
0 commit comments