Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: skip source-faker tests on Python 3.12 (do not merge) #609

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
310 changes: 157 additions & 153 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version = "0.0.0"
enable = true

[tool.poetry.dependencies]
python = ">=3.10,<3.12"
python = ">=3.10,<3.13"

airbyte-api = "^0.52.1"
airbyte-cdk = "^6.28.0"
Expand Down
8 changes: 8 additions & 0 deletions tests/integration_tests/test_all_cache_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def add_venv_bin_to_path(monkeypatch):


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker_seed_a() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = get_source(
Expand All @@ -79,6 +83,10 @@ def source_faker_seed_a() -> ab.Source:


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker_seed_b() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = get_source(
Expand Down
13 changes: 13 additions & 0 deletions tests/integration_tests/test_config_change_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import annotations

import sys
import pytest
from typing import Any
from unittest.mock import patch
Expand Down Expand Up @@ -35,6 +36,10 @@ def new_duckdb_destination() -> Destination:


@pytest.fixture
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def new_source_faker() -> Source:
return get_source(
"source-faker",
Expand All @@ -49,6 +54,10 @@ def new_source_faker() -> Source:
)


@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def test_source_config_callback(
new_duckdb_destination: Destination,
new_source_faker: Source,
Expand Down Expand Up @@ -76,6 +85,10 @@ def test_source_config_callback(
mock_config_change_callback.assert_called_once_with(updated_config)


@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def test_destination_config_callback(
new_duckdb_destination: Destination,
new_source_faker: Source,
Expand Down
9 changes: 9 additions & 0 deletions tests/integration_tests/test_docker_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import annotations

import sys
import tempfile
from collections.abc import Generator
from pathlib import Path
Expand All @@ -30,6 +31,10 @@


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_docker_faker_seed_a() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = ab.get_source(
Expand All @@ -46,6 +51,10 @@ def source_docker_faker_seed_a() -> ab.Source:


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_docker_faker_seed_b() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = ab.get_source(
Expand Down
8 changes: 8 additions & 0 deletions tests/integration_tests/test_duckdb_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def add_venv_bin_to_path(monkeypatch):
monkeypatch.setenv("PATH", new_path)


@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def setup_source_faker() -> ab.Source:
"""Test the source-faker setup."""
source = ab.get_source(
Expand All @@ -62,6 +66,10 @@ def setup_source_faker() -> ab.Source:


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
return setup_source_faker()
Expand Down
8 changes: 8 additions & 0 deletions tests/integration_tests/test_source_faker_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def add_venv_bin_to_path(monkeypatch):


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker_seed_a() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = ab.get_source(
Expand All @@ -69,6 +73,10 @@ def source_faker_seed_a() -> ab.Source:


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker_seed_b() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = ab.get_source(
Expand Down
21 changes: 21 additions & 0 deletions tests/integration_tests/test_state_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import annotations

import sys
from pathlib import Path

import airbyte as ab
Expand All @@ -28,6 +29,10 @@


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker_seed_a() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = ab.get_source(
Expand All @@ -43,6 +48,10 @@ def source_faker_seed_a() -> ab.Source:


@pytest.fixture(scope="function") # Each test gets a fresh source-faker instance.
@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def source_faker_seed_b() -> ab.Source:
"""Fixture to return a source-faker connector instance."""
source = ab.get_source(
Expand All @@ -57,6 +66,10 @@ def source_faker_seed_b() -> ab.Source:
return source


@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def test_incremental_state_cache_persistence(
source_faker_seed_a: ab.Source,
source_faker_seed_b: ab.Source,
Expand Down Expand Up @@ -88,6 +101,10 @@ def test_incremental_state_cache_persistence(
assert state_provider.get_stream_state("purchases")


@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def test_incremental_state_prefix_isolation(
source_faker_seed_a: ab.Source,
source_faker_seed_b: ab.Source,
Expand Down Expand Up @@ -166,6 +183,10 @@ def e2e_test_destination() -> ab.Destination:
)


@pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="source-faker is not yet compatible with Python 3.12",
)
def test_destination_state(
source_faker_seed_a: ab.Source,
e2e_test_destination: ab.Destination,
Expand Down
Loading