Skip to content

Commit a5b75d9

Browse files
committed
test(sdk): remove redundant sys.argv patch from test_process_detector
Since ProcessResourceDetector now prefers sys.orig_argv (Python 3.10+), the @patch('sys.argv', ...) decorator on test_process_detector is redundant — the detector reads from sys.orig_argv which is already patched. Remove it as suggested in review. Addresses xrmx's review comment on open-telemetry#5083. Signed-off-by: Ali <alliasgher123@gmail.com>
1 parent 72470e6 commit a5b75d9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

opentelemetry-sdk/tests/resources/test_resources.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,6 @@ def test_service_name_env_precedence(self):
560560
Resource({"service.name": "from-service-name"}),
561561
)
562562

563-
@patch(
564-
"sys.argv",
565-
["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"],
566-
)
567563
@patch(
568564
"sys.orig_argv",
569565
["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"],

0 commit comments

Comments
 (0)