Skip to content

Commit

Permalink
fix CI failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCardin committed Jul 2, 2024
1 parent cba3782 commit 909dc5c
Show file tree
Hide file tree
Showing 16 changed files with 298 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
fail-fast: true
matrix:
# Test our minimum version bound, the highest version available,
# and something in the middle (i.e. what gets run locally).
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test-base:
-m 'not postgres and not redshift and not mongo and not redis and not mysql and not moto'

test-parallel:
SQLALCHEMY_WARN_20=1 coverage run -m pytest -n 4 src tests -vv --pmr-multiprocess-safe
SQLALCHEMY_WARN_20=1 coverage run -m pytest -n 4 src tests -vv --pmr-multiprocess-safe --dist=loadfile

test: test-parallel
SQLALCHEMY_WARN_20=1 coverage run -a -m pytest src tests -vv
Expand Down
57 changes: 30 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ python-on-whales = {version = ">=0.22.0", optional = true}
botocore = "1.31.63"
coverage = "*"
moto = ">=2.3.2"
mypy = {version = "0.982"}
mypy = {version = "1.4.0"}
pytest-asyncio = "*"
pytest-order = "^1.2.0"
pytest-xdist = "*"
Expand Down
10 changes: 10 additions & 0 deletions src/pytest_mock_resources/compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import importlib.resources
import sys

from pytest_mock_resources.compat.import_ import ImportAdaptor

# isort: split
Expand Down Expand Up @@ -70,6 +73,13 @@
pymysql = ImportAdaptor("pymysql", "mysql")


def get_resource(package: str) -> str:
if sys.version_info >= (3, 9):
return str(importlib.resources.files(package))

return str(importlib.resources.path(package, "").__enter__())


__all__ = [
"sqlalchemy",
"psycopg2",
Expand Down
Loading

0 comments on commit 909dc5c

Please sign in to comment.