FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

馃敟 Remove outdated `needs_py310` marker from tests by stickm4n 路 Pull Request #1852 路 fastapi/sqlmodel 路 GitHub

馃敟 Remove outdated `needs_py310` marker from tests by stickm4n 路 Pull Request #1852 路 fastapi/sqlmodel 路 GitHub
Skip to content

Navigation Menu

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (84) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 0 additions & 6 deletions tests/conftest.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import shutil
import subprocess
import sys
from collections.abc import Callable, Generator
from dataclasses import dataclass, field
from pathlib import Path
Expand Down Expand Up @@ -84,8 +83,3 @@ def print_mock_fixture() -> Generator[PrintMock, None, None]:
new_print = get_testing_print_function(print_mock.calls)
with patch("builtins.print", new=new_print):
yield print_mock


needs_py310 = pytest.mark.skipif(
sys.version_info < (3, 10), reason="requires python3.10+"
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import pytest
from sqlmodel import create_engine

from ...conftest import PrintMock, needs_py310
from ...conftest import PrintMock


@pytest.fixture(
name="mod",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_advanced/test_uuid/test_tutorial001.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from dirty_equals import IsUUID
from sqlmodel import create_engine

from ...conftest import PrintMock, needs_py310
from ...conftest import PrintMock


@pytest.fixture(
name="mod",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_advanced/test_uuid/test_tutorial002.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from dirty_equals import IsUUID
from sqlmodel import create_engine

from ...conftest import PrintMock, needs_py310
from ...conftest import PrintMock


@pytest.fixture(
name="mod",
params=[
pytest.param("tutorial002_py310", marks=needs_py310),
pytest.param("tutorial002_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from sqlmodel import create_engine

from tests.conftest import PrintMock, needs_py310
from tests.conftest import PrintMock


def check_calls(calls: list[list[str | dict[str, Any]]]) -> None:
Expand Down Expand Up @@ -138,8 +138,8 @@ def check_calls(calls: list[list[str | dict[str, Any]]]) -> None:
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial002_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
pytest.param("tutorial002_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from sqlmodel import create_engine

from tests.conftest import PrintMock, needs_py310
from tests.conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -34,7 +34,7 @@ class Modules:
@pytest.fixture(
name="modules",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_modules(request: pytest.FixtureRequest) -> Modules:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from sqlmodel import create_engine

from ...conftest import PrintMock, needs_py310
from ...conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -34,7 +34,7 @@ class Modules:
@pytest.fixture(
name="modules",
params=[
pytest.param("tutorial002_py310", marks=needs_py310),
pytest.param("tutorial002_py310"),
],
)
def get_modules(request: pytest.FixtureRequest) -> Modules:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from sqlalchemy.engine.reflection import Inspector
from sqlmodel import create_engine

from tests.conftest import needs_py310


@pytest.fixture(
name="module",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -63,7 +63,7 @@
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -43,7 +43,7 @@
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -77,7 +77,7 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType:
@pytest.mark.parametrize(
"module",
[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
indirect=True,
)
Expand All @@ -89,7 +89,7 @@ def test_tutorial001(print_mock: PrintMock, module: ModuleType):
@pytest.mark.parametrize(
"module",
[
pytest.param("tutorial002_py310", marks=needs_py310),
pytest.param("tutorial002_py310"),
],
indirect=True,
)
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -79,7 +79,7 @@
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial003_py310", marks=needs_py310),
pytest.param("tutorial003_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -53,7 +53,7 @@
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial004_py310", marks=needs_py310),
pytest.param("tutorial004_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -55,7 +55,7 @@
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial005_py310", marks=needs_py310),
pytest.param("tutorial005_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ....conftest import PrintMock, needs_py310
from ....conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -53,7 +53,7 @@
@pytest.fixture(
name="module",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import pytest

from ...conftest import coverage_run, needs_py310
from ...conftest import coverage_run


@pytest.mark.parametrize(
"module_name",
[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def test_create_db_and_table(cov_tmp_path: Path, module_name: str):
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from sqlalchemy.engine.reflection import Inspector
from sqlmodel import create_engine

from ...conftest import needs_py310


@pytest.fixture(
name="module",
params=[
pytest.param("tutorial002_py310", marks=needs_py310),
pytest.param("tutorial002_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from sqlalchemy.engine.reflection import Inspector
from sqlmodel import create_engine

from ...conftest import needs_py310


@pytest.fixture(
name="module",
params=[
pytest.param("tutorial003_py310", marks=needs_py310),
pytest.param("tutorial003_py310"),
],
)
def get_module(request: pytest.FixtureRequest) -> ModuleType:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
from sqlmodel import create_engine

from ...conftest import PrintMock, needs_py310
from ...conftest import PrintMock

expected_calls = [
[
Expand Down Expand Up @@ -71,7 +71,7 @@ def get_module(request: pytest.FixtureRequest) -> ModuleType:
@pytest.mark.parametrize(
"module",
[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
indirect=True,
)
Expand All @@ -83,7 +83,7 @@ def test_tutorial001(print_mock: PrintMock, module: ModuleType):
@pytest.mark.parametrize(
"module",
[
pytest.param("tutorial002_py310", marks=needs_py310),
pytest.param("tutorial002_py310"),
],
indirect=True,
)
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import pytest

from tests.conftest import needs_py310


@dataclass
class Modules:
Expand All @@ -17,7 +15,7 @@ class Modules:
@pytest.fixture(
name="modules_path",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_modules_path(request: pytest.FixtureRequest) -> str:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import pytest

from tests.conftest import needs_py310


@dataclass
class Modules:
Expand All @@ -17,7 +15,7 @@ class Modules:
@pytest.fixture(
name="modules_path",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_modules_path(request: pytest.FixtureRequest) -> str:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import pytest

from tests.conftest import needs_py310


@dataclass
class Modules:
Expand All @@ -17,7 +15,7 @@ class Modules:
@pytest.fixture(
name="modules_path",
params=[
pytest.param("tutorial001_py310", marks=needs_py310),
pytest.param("tutorial001_py310"),
],
)
def get_modules_path(request: pytest.FixtureRequest) -> str:
Expand Down
Loading
Loading

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL