Skip to content

Commit 02c63d3

Browse files
authored
Test suites refactoring (#1416)
1 parent 7e46f2b commit 02c63d3

Some content is hidden

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

43 files changed

+1248
-1172
lines changed

fastapi_pagination/ext/motor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
__all__ = ["paginate"]
1+
__all__ = [
2+
"paginate",
3+
"paginate_aggregate",
4+
]
25

36
from typing import TYPE_CHECKING, Any, Optional
47

poetry.lock

Lines changed: 96 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/ci-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ _pytest tests/ext
4646

4747
echo "Running tests with SQLAlchemy<2"
4848
_pip install -U "sqlalchemy<2"
49-
_pytest tests -m "not sqlalchemy20"
49+
_pytest tests/ext -m "not sqlalchemy20"
5050

5151
if [[ "$PYDANTIC_V2" == true ]]; then
5252
echo "Running ormar tests"
5353
_pip install -U ormar
54-
_pytest tests -m ormar
54+
_pytest tests/ext -m ormar
5555
_pip uninstall -y ormar
5656
fi
5757

@@ -62,7 +62,7 @@ fi
6262

6363
echo "Running orm tests"
6464
_pip install "databases<0.9.0" orm
65-
_pytest tests -m orm
65+
_pytest tests/ext -m orm
6666
_pip uninstall -y orm
6767

6868
echo "Restore env"

tests/base.py

Lines changed: 0 additions & 172 deletions
This file was deleted.

tests/base/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
__all__ = [
2+
"BasePaginationTestSuite",
3+
"SuiteBuilder",
4+
"async_testsuite",
5+
"cases",
6+
]
7+
8+
from .builder import SuiteBuilder
9+
from .decorators import async_testsuite, cases
10+
from .suite import BasePaginationTestSuite

0 commit comments

Comments
 (0)