Skip to content

Commit

Permalink
remove new category of tests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-bl committed Oct 31, 2024
1 parent b75adda commit 9e71936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 48 deletions.
33 changes: 0 additions & 33 deletions end_to_end_tests/end_to_end_live_tests.py

This file was deleted.

18 changes: 3 additions & 15 deletions end_to_end_tests/test_end_to_end.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import os
import shutil
from filecmp import cmpfiles, dircmp
from pathlib import Path
import sys
from typing import Callable, Dict, List, Optional, Set
from typing import Dict, List, Optional, Set

import pytest
from click.testing import Result
from typer.testing import CliRunner

from openapi_python_client.cli import app
from .end_to_end_live_tests import live_tests_3_x



def _compare_directories(
Expand Down Expand Up @@ -87,7 +83,6 @@ def run_e2e_test(
golden_record_path: str = "golden-record",
output_path: str = "my-test-api-client",
expected_missing: Optional[Set[str]] = None,
live_tests: Optional[Callable[[str], None]] = None,
) -> Result:
output_path = Path.cwd() / output_path
shutil.rmtree(output_path, ignore_errors=True)
Expand All @@ -102,13 +97,6 @@ def run_e2e_test(
_compare_directories(
gr_path, output_path, expected_differences=expected_differences, expected_missing=expected_missing
)
if live_tests:
old_path = sys.path.copy()
sys.path.insert(0, str(output_path))
try:
live_tests()
finally:
sys.path = old_path

import mypy.api

Expand Down Expand Up @@ -143,11 +131,11 @@ def _run_command(command: str, extra_args: Optional[List[str]] = None, openapi_d


def test_baseline_end_to_end_3_0():
run_e2e_test("baseline_openapi_3.0.json", [], {}, live_tests=live_tests_3_x)
run_e2e_test("baseline_openapi_3.0.json", [], {})


def test_baseline_end_to_end_3_1():
run_e2e_test("baseline_openapi_3.1.yaml", [], {}, live_tests=live_tests_3_x)
run_e2e_test("baseline_openapi_3.1.yaml", [], {})


def test_3_1_specific_features():
Expand Down

0 comments on commit 9e71936

Please sign in to comment.