Skip to content

Commit

Permalink
Merge pull request #370 from ic4f/dev_fix_358
Browse files Browse the repository at this point in the history
Remove reference to psycopg2 from default param value, function body
  • Loading branch information
fizyk committed Feb 22, 2021
2 parents 7936b65 + c7df6be commit f88380d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pytest_postgresql/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import platform
import subprocess
from tempfile import gettempdir
from typing import List, Callable, Union, Iterable
from typing import List, Callable, Union, Iterable, Optional
from warnings import warn

import pytest
Expand Down Expand Up @@ -216,7 +216,7 @@ def postgresql_noproc_fixture(request: FixtureRequest) -> NoopExecutor:

def postgresql(
process_fixture_name: str, db_name: str = None, load: List[str] = None,
isolation_level: int = psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT,
isolation_level: Optional[int] = None,
) -> Callable[[FixtureRequest], connection]:
"""
Return connection fixture factory for PostgreSQL.
Expand Down
4 changes: 2 additions & 2 deletions src/pytest_postgresql/janitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(
db_name: str,
version: Union[str, float, Version],
password: str = None,
isolation_level: int = psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT,
isolation_level: Optional[int] = None,
) -> None:
"""
Initialize janitor.
Expand All @@ -43,7 +43,7 @@ def __init__(
self.host = host
self.port = port
self.db_name = db_name
self.isolation_level = isolation_level
self.isolation_level = isolation_level or psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT
if not isinstance(version, Version):
self.version = parse_version(str(version))
else:
Expand Down

0 comments on commit f88380d

Please sign in to comment.