Skip to content

Commit

Permalink
Lint and unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi committed Apr 24, 2023
1 parent d28c040 commit 336b89a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions solarwinds_apm/apm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,7 @@ def _convert_to_bool(val):
raise ValueError
oboe_trace_mode = OboeTracingMode.get_oboe_trace_mode(val)
self.__config[key] = oboe_trace_mode
self.context.setTracingMode(
oboe_trace_mode
)
self.context.setTracingMode(oboe_trace_mode)
elif keys == ["trigger_trace"]:
if not isinstance(val, str):
raise ValueError
Expand Down
1 change: 0 additions & 1 deletion solarwinds_apm/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import enum
import logging
import re
from types import MappingProxyType
from typing import TYPE_CHECKING, Optional, Sequence

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_apm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def test_set_config_value_default_proxy(self, caplog, mock_env_vars):
def test_set_config_value_default_tracing_mode(self, caplog, mock_env_vars):
test_config = apm_config.SolarWindsApmConfig()
test_config._set_config_value("tracing_mode", "not-valid-mode")
assert test_config.get("tracing_mode") == None
assert test_config.get("tracing_mode") == -1
assert "Ignore config option" in caplog.text

# pylint:disable=unused-argument
Expand Down

0 comments on commit 336b89a

Please sign in to comment.