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

Switch unit tests from unittest.mock to SDK & in-memory exporter #303

Closed
Oberon00 opened this issue Nov 25, 2019 · 2 comments · Fixed by #306
Closed

Switch unit tests from unittest.mock to SDK & in-memory exporter #303

Oberon00 opened this issue Nov 25, 2019 · 2 comments · Fixed by #306
Assignees

Comments

@Oberon00
Copy link
Member

See #290 (comment).
Currently tests are cumbersome to write and actually we probably don't want to test which API calls are made but what Spans would result in most cases. For this a SDK with in-memory exporter would be better than using unittest.mock.

@mauriciovasquezbernal
Copy link
Member

I don't think this is actually done. #306 fixed that for wsgi and Flask, but there are other cases where mock is used:

self.start_current_span_patcher = mock.patch.object(

start_current_span_patcher = mock.patch.object(

c24t added a commit that referenced this issue Apr 20, 2020
Update tests to use TestBase as described on #303.

Co-authored-by: Yusuke Tsutsumi <yusuke@tsutsumi.io>
Co-authored-by: Chris Kleinknecht <libc@google.com>
@mauriciovasquezbernal
Copy link
Member

I think it's solved now by the above PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants