-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse port_search_count as an int #1114
base: main
Are you sure you want to change the base?
Conversation
pytest_postgresql/config.py
Outdated
|
||
load_paths = detect_paths(get_postgresql_option("load")) | ||
|
||
return PostgresqlConfigDict( | ||
exec=get_postgresql_option("exec"), | ||
host=get_postgresql_option("host"), | ||
port=get_postgresql_option("port"), | ||
port_search_count=get_postgresql_option("port_search_count"), | ||
# Parse as int, because if it's defined in an INI file then it'll always be a string | ||
port_search_count=int(get_postgresql_option("port_search_count", default=5)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd defer to keeping all defaults in single place either defaults for ini or here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! I'll keep them in INI. This should also fix the bug where my return request.config.getoption(name) or request.config.getini(name) or default
code was returning None for any falsey config setting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I could change it to be more careful about only coalescing when request.config.getoption(name) is None)
Chore that needs to be done:
pipenv run towncrier create [issue_number].[type].rst
Types are defined in the pyproject.toml, issue_number either from issue tracker or the Pull request number