Skip to content
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

Increase test coverage for newrelic/config.py #860

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@

_cache_object = []


def _reset_config_parser():
global _config_object
global _cache_object
_config_object = ConfigParser.RawConfigParser()
_cache_object = []


# Mechanism for extracting settings from the configuration for use in
# instrumentation modules and extensions.

Expand Down Expand Up @@ -550,6 +558,11 @@ def _process_configuration(section):
_configuration_done = False


def _reset_configuration_done():
global _configuration_done
_configuration_done = False


def _process_app_name_setting():
# Do special processing to handle the case where the application
# name was actually a semicolon separated list of names. In this
Expand Down Expand Up @@ -1238,7 +1251,6 @@ def _process_wsgi_application_configuration():
for section in _config_object.sections():
if not section.startswith("wsgi-application:"):
continue

enabled = False

try:
Expand Down Expand Up @@ -3106,6 +3118,11 @@ def _process_module_entry_points():
_instrumentation_done = False


def _reset_instrumentation_done():
global _instrumentation_done
_instrumentation_done = False


def _setup_instrumentation():
global _instrumentation_done

Expand Down
Loading