Skip to content

Updating requirements to support new OpenTracing version. #9

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e .
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
platforms='any',
install_requires=[
'sqlalchemy',
'opentracing>=1.1,<=1.3'
'opentracing>=1.1,<=2.2'
],
classifiers=[
'Intended Audience :: Developers',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from mock import patch
from unittest.mock import patch
from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String
from sqlalchemy.engine import Engine
from sqlalchemy.exc import OperationalError
Expand Down
8 changes: 4 additions & 4 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_traced_transaction(self):
self.assertEqual(True, all(map(lambda x: x.is_finished, tracer.spans)))
self.assertEqual(True, all(map(lambda x: x.child_of == parent_span, tracer.spans)))
self.assertEqual(['create_table', 'insert', 'select'],
map(lambda x: x.operation_name, tracer.spans))
list(map(lambda x: x.operation_name, tracer.spans)))

def test_traced_transaction_nested(self):
tracer = DummyTracer()
Expand All @@ -189,7 +189,7 @@ def test_traced_transaction_nested(self):
self.assertEqual(True, all(map(lambda x: x.is_finished, tracer.spans)))
self.assertEqual(True, all(map(lambda x: x.child_of == parent_span, tracer.spans)))
self.assertEqual(['create_table', 'insert', 'select'],
map(lambda x: x.operation_name, tracer.spans))
list(map(lambda x: x.operation_name, tracer.spans)))

def test_traced_rollback(self):
tracer = DummyTracer()
Expand All @@ -216,9 +216,9 @@ def test_traced_rollback(self):
self.assertEqual(True, all(map(lambda x: x.is_finished, tracer.spans)))
self.assertEqual(True, all(map(lambda x: x.child_of == parent_span, tracer.spans)))
self.assertEqual(['insert', 'create_table'],
map(lambda x: x.operation_name, tracer.spans))
list(map(lambda x: x.operation_name, tracer.spans)))
self.assertEqual(['false', 'true'],
map(lambda x: x.tags.get('error', 'false'), tracer.spans))
list(map(lambda x: x.tags.get('error', 'false'), tracer.spans)))

def test_traced_after_transaction(self):
tracer = DummyTracer()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def test_traced_bulk_insert(self):
parent_span = DummySpan('parent')
session = self.session
sqlalchemy_opentracing.set_parent_span(session, parent_span)
users = [User(name = 'User-%s' % i) for i in xrange(10)]
users = [User(name = 'User-%s' % i) for i in range(10)]
session.bulk_save_objects(users)

self.assertEqual(1, len(tracer.spans))
Expand Down