Skip to content

Commit 77f8001

Browse files
committed
Remove needs_py310 marker from tests
1 parent c113f5a commit 77f8001

File tree

84 files changed

+149
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+149
-203
lines changed

tests/conftest.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import shutil
22
import subprocess
3-
import sys
43
from collections.abc import Callable, Generator
54
from dataclasses import dataclass, field
65
from pathlib import Path
@@ -84,8 +83,3 @@ def print_mock_fixture() -> Generator[PrintMock, None, None]:
8483
new_print = get_testing_print_function(print_mock.calls)
8584
with patch("builtins.print", new=new_print):
8685
yield print_mock
87-
88-
89-
needs_py310 = pytest.mark.skipif(
90-
sys.version_info < (3, 10), reason="requires python3.10+"
91-
)

tests/test_advanced/test_decimal/test_tutorial001.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
import pytest
66
from sqlmodel import create_engine
77

8-
from ...conftest import PrintMock, needs_py310
8+
from ...conftest import PrintMock
99

1010

1111
@pytest.fixture(
1212
name="mod",
1313
params=[
14-
pytest.param("tutorial001_py310", marks=needs_py310),
14+
pytest.param("tutorial001_py310"),
1515
],
1616
)
1717
def get_module(request: pytest.FixtureRequest) -> ModuleType:

tests/test_advanced/test_uuid/test_tutorial001.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
from dirty_equals import IsUUID
66
from sqlmodel import create_engine
77

8-
from ...conftest import PrintMock, needs_py310
8+
from ...conftest import PrintMock
99

1010

1111
@pytest.fixture(
1212
name="mod",
1313
params=[
14-
pytest.param("tutorial001_py310", marks=needs_py310),
14+
pytest.param("tutorial001_py310"),
1515
],
1616
)
1717
def get_module(request: pytest.FixtureRequest) -> ModuleType:

tests/test_advanced/test_uuid/test_tutorial002.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
from dirty_equals import IsUUID
66
from sqlmodel import create_engine
77

8-
from ...conftest import PrintMock, needs_py310
8+
from ...conftest import PrintMock
99

1010

1111
@pytest.fixture(
1212
name="mod",
1313
params=[
14-
pytest.param("tutorial002_py310", marks=needs_py310),
14+
pytest.param("tutorial002_py310"),
1515
],
1616
)
1717
def get_module(request: pytest.FixtureRequest) -> ModuleType:

tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
from sqlmodel import create_engine
77

8-
from tests.conftest import PrintMock, needs_py310
8+
from tests.conftest import PrintMock
99

1010

1111
def check_calls(calls: list[list[str | dict[str, Any]]]) -> None:
@@ -138,8 +138,8 @@ def check_calls(calls: list[list[str | dict[str, Any]]]) -> None:
138138
@pytest.fixture(
139139
name="module",
140140
params=[
141-
pytest.param("tutorial001_py310", marks=needs_py310),
142-
pytest.param("tutorial002_py310", marks=needs_py310),
141+
pytest.param("tutorial001_py310"),
142+
pytest.param("tutorial002_py310"),
143143
],
144144
)
145145
def get_module(request: pytest.FixtureRequest) -> ModuleType:

tests/test_tutorial/test_code_structure/test_tutorial001.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
from sqlmodel import create_engine
77

8-
from tests.conftest import PrintMock, needs_py310
8+
from tests.conftest import PrintMock
99

1010
expected_calls = [
1111
[
@@ -34,7 +34,7 @@ class Modules:
3434
@pytest.fixture(
3535
name="modules",
3636
params=[
37-
pytest.param("tutorial001_py310", marks=needs_py310),
37+
pytest.param("tutorial001_py310"),
3838
],
3939
)
4040
def get_modules(request: pytest.FixtureRequest) -> Modules:

tests/test_tutorial/test_code_structure/test_tutorial002.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
from sqlmodel import create_engine
77

8-
from ...conftest import PrintMock, needs_py310
8+
from ...conftest import PrintMock
99

1010
expected_calls = [
1111
[
@@ -34,7 +34,7 @@ class Modules:
3434
@pytest.fixture(
3535
name="modules",
3636
params=[
37-
pytest.param("tutorial002_py310", marks=needs_py310),
37+
pytest.param("tutorial002_py310"),
3838
],
3939
)
4040
def get_modules(request: pytest.FixtureRequest) -> Modules:

tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
from sqlalchemy.engine.reflection import Inspector
77
from sqlmodel import create_engine
88

9-
from tests.conftest import needs_py310
10-
119

1210
@pytest.fixture(
1311
name="module",
1412
params=[
15-
pytest.param("tutorial001_py310", marks=needs_py310),
13+
pytest.param("tutorial001_py310"),
1614
],
1715
)
1816
def get_module(request: pytest.FixtureRequest) -> ModuleType:

tests/test_tutorial/test_connect/test_delete/test_tutorial001.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
from sqlmodel import create_engine
66

7-
from ....conftest import PrintMock, needs_py310
7+
from ....conftest import PrintMock
88

99
expected_calls = [
1010
[
@@ -63,7 +63,7 @@
6363
@pytest.fixture(
6464
name="module",
6565
params=[
66-
pytest.param("tutorial001_py310", marks=needs_py310),
66+
pytest.param("tutorial001_py310"),
6767
],
6868
)
6969
def get_module(request: pytest.FixtureRequest) -> ModuleType:

tests/test_tutorial/test_connect/test_insert/test_tutorial001.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
from sqlmodel import create_engine
66

7-
from ....conftest import PrintMock, needs_py310
7+
from ....conftest import PrintMock
88

99
expected_calls = [
1010
[
@@ -43,7 +43,7 @@
4343
@pytest.fixture(
4444
name="module",
4545
params=[
46-
pytest.param("tutorial001_py310", marks=needs_py310),
46+
pytest.param("tutorial001_py310"),
4747
],
4848
)
4949
def get_module(request: pytest.FixtureRequest) -> ModuleType:

0 commit comments

Comments
 (0)