Skip to content

Commit 918341f

Browse files
Merge pull request #1 from aabmass/genaisdk_instrumentation-pythonpathfix
Remove the need for changing pythonpath with pytest
2 parents f240b85 + 62c4963 commit 918341f

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/__init__.py

Whitespace-only changes.

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/__init__.py

Whitespace-only changes.

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/nonstreaming_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import os
1717
import unittest
1818

19-
from common.base import TestCase
19+
from ..common.base import TestCase
2020

2121

2222
def create_valid_response(

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_async_nonstreaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import logging
2121
import unittest
2222

23-
from common.base import TestCase
23+
from ..common.base import TestCase
2424

2525

2626
def create_valid_response(
@@ -67,7 +67,7 @@ def configure_valid_response(
6767

6868
def generate_content(self, *args, **kwargs):
6969
return asyncio.run(
70-
self.client.aio.models.generate_content(*args, **kwargs)
70+
self.client.aio.models.generate_content(*args, **kwargs) # pylint: disable=missing-kwoa
7171
)
7272

7373
def test_async_generate_content_not_broken_by_instrumentation(self):

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_async_streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import logging
2323
import unittest
2424

25-
from common.base import TestCase
25+
from ..common.base import TestCase
2626

2727

2828
def create_valid_response(
@@ -71,7 +71,7 @@ async def _generate_content_helper(self, *args, **kwargs):
7171
result = []
7272
async for (
7373
response
74-
) in await self.client.aio.models.generate_content_stream(
74+
) in await self.client.aio.models.generate_content_stream( # pylint: disable=missing-kwoa
7575
*args, **kwargs
7676
):
7777
result.append(response)

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_sync_nonstreaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import logging
1616
import unittest
1717

18-
from nonstreaming_base import NonStreamingTestCase
18+
from .nonstreaming_base import NonStreamingTestCase
1919

2020

2121
class TestGenerateContentSyncNonstreaming(NonStreamingTestCase):

instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_sync_streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import logging
2020
import unittest
2121

22-
from common.base import TestCase
22+
from ..common.base import TestCase
2323

2424

2525
def create_valid_response(
@@ -66,7 +66,7 @@ def configure_valid_response(
6666

6767
def generate_content(self, *args, **kwargs):
6868
result = []
69-
for response in self.client.models.generate_content_stream(
69+
for response in self.client.models.generate_content_stream( # pylint: disable=missing-kwoa
7070
*args, **kwargs
7171
):
7272
result.append(response)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ commands =
820820
test-instrumentation-vertexai: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai/tests --vcr-record=none {posargs}
821821
lint-instrumentation-vertexai: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-vertexai"
822822

823-
test-instrumentation-google-genai: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests -o pythonpath={toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests --vcr-record=none {posargs}
823+
test-instrumentation-google-genai: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests --vcr-record=none {posargs}
824824
lint-instrumentation-google-genai: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-google-genai"
825825

826826
test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs}

0 commit comments

Comments
 (0)