Fix conftest.py to provide proper path fixtures for integration tests
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
@@ -1,7 +1,21 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def temp_dir(tmp_path):
|
def temp_dir(tmp_path):
|
||||||
"""Provide a temporary directory."""
|
"""Provide a temporary directory."""
|
||||||
return tmp_path
|
return tmp_path
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def examples_dir():
|
||||||
|
"""Provide the path to the examples directory."""
|
||||||
|
return Path(__file__).parent.parent / "examples"
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def sample_spec_path(examples_dir):
|
||||||
|
"""Provide the path to the sample petstore spec."""
|
||||||
|
return str(examples_dir / "petstore.yaml")
|
||||||
Reference in New Issue
Block a user