Skip to content

Commit a7db1c0

Browse files
committed
Fix tests
1 parent 558ae79 commit a7db1c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_script.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
import pytest
77

88
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
1010

1111
version = "v2" if V2 else "v1"
1212

13+
DEBUG = os.environ.get("DEBUG", False)
14+
1315

1416
def _results_directory() -> str:
1517
return os.path.join(os.path.dirname(os.path.realpath(__file__)), "expected_results")
@@ -38,7 +40,7 @@ def run_test(
3840
if call_from_python:
3941
generate_typescript_defs(module_path, output_path, exclude)
4042
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\""
4244
for model_to_exclude in exclude:
4345
cmd += f" --exclude {model_to_exclude}"
4446
subprocess.run(cmd, shell=True, check=True)

0 commit comments

Comments
 (0)