Skip to content

Commit de5a0a0

Browse files
committed
Keep the default in ini defaults
1 parent ca24ced commit de5a0a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pytest_postgresql/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class PostgresqlConfigDict(TypedDict):
2828
def get_config(request: FixtureRequest) -> PostgresqlConfigDict:
2929
"""Return a dictionary with config options."""
3030

31-
def get_postgresql_option(option: str, default: Any = None) -> Any:
31+
def get_postgresql_option(option: str) -> Any:
3232
name = "postgresql_" + option
33-
return request.config.getoption(name) or request.config.getini(name) or default
33+
return request.config.getoption(name) or request.config.getini(name)
3434

3535
load_paths = detect_paths(get_postgresql_option("load"))
3636

@@ -39,7 +39,7 @@ def get_postgresql_option(option: str, default: Any = None) -> Any:
3939
host=get_postgresql_option("host"),
4040
port=get_postgresql_option("port"),
4141
# Parse as int, because if it's defined in an INI file then it'll always be a string
42-
port_search_count=int(get_postgresql_option("port_search_count", default=5)),
42+
port_search_count=int(get_postgresql_option("port_search_count")),
4343
user=get_postgresql_option("user"),
4444
password=get_postgresql_option("password"),
4545
options=get_postgresql_option("options"),

0 commit comments

Comments
 (0)