1- import os
21import shutil
32from filecmp import cmpfiles , dircmp
43from pathlib import Path
5- import sys
6- from typing import Callable , Dict , List , Optional , Set
4+ from typing import Dict , List , Optional , Set
75
86import pytest
97from click .testing import Result
108from typer .testing import CliRunner
119
1210from openapi_python_client .cli import app
13- from .end_to_end_live_tests import live_tests_3_x
14-
1511
1612
1713def _compare_directories (
@@ -87,7 +83,6 @@ def run_e2e_test(
8783 golden_record_path : str = "golden-record" ,
8884 output_path : str = "my-test-api-client" ,
8985 expected_missing : Optional [Set [str ]] = None ,
90- live_tests : Optional [Callable [[str ], None ]] = None ,
9186) -> Result :
9287 output_path = Path .cwd () / output_path
9388 shutil .rmtree (output_path , ignore_errors = True )
@@ -102,13 +97,6 @@ def run_e2e_test(
10297 _compare_directories (
10398 gr_path , output_path , expected_differences = expected_differences , expected_missing = expected_missing
10499 )
105- if live_tests :
106- old_path = sys .path .copy ()
107- sys .path .insert (0 , str (output_path ))
108- try :
109- live_tests ()
110- finally :
111- sys .path = old_path
112100
113101 import mypy .api
114102
@@ -143,11 +131,11 @@ def _run_command(command: str, extra_args: Optional[List[str]] = None, openapi_d
143131
144132
145133def test_baseline_end_to_end_3_0 ():
146- run_e2e_test ("baseline_openapi_3.0.json" , [], {}, live_tests = live_tests_3_x )
134+ run_e2e_test ("baseline_openapi_3.0.json" , [], {})
147135
148136
149137def test_baseline_end_to_end_3_1 ():
150- run_e2e_test ("baseline_openapi_3.1.yaml" , [], {}, live_tests = live_tests_3_x )
138+ run_e2e_test ("baseline_openapi_3.1.yaml" , [], {})
151139
152140
153141def test_3_1_specific_features ():
0 commit comments