diff --git a/README.rst b/README.rst index 4f3d8d0..b44d952 100644 --- a/README.rst +++ b/README.rst @@ -142,7 +142,7 @@ Manually canceling tracing will not clear any tracing already done - it will sim Further information =================== -If you’re interested in learning more about the OpenTracing standard, please visit `opentracing.io`_ or `join the mailing list`_. If you would like to implement OpenTracing in your project and need help, feel free to send us a note at `community@opentracing.io`_. +If you're interested in learning more about the OpenTracing standard, please visit `opentracing.io`_ or `join the mailing list`_. If you would like to implement OpenTracing in your project and need help, feel free to send us a note at `community@opentracing.io`_. .. _opentracing.io: http://opentracing.io/ .. _join the mailing list: http://opentracing.us13.list-manage.com/subscribe?u=180afe03860541dae59e84153&id=19117aa6cd diff --git a/setup.py b/setup.py index 5e42d38..2c44404 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,9 @@ platforms='any', install_requires=[ 'sqlalchemy', - 'opentracing>=1.1,<=1.3' + 'opentracing' ], + tests_require=['pytest-cov'], classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', diff --git a/tests/test_api.py b/tests/test_api.py index b15a35c..fe50d18 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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 diff --git a/tests/test_core.py b/tests/test_core.py index 9a1a2a7..b77e60c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -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() @@ -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() @@ -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() diff --git a/tests/test_orm.py b/tests/test_orm.py index bed6ee2..a2dba22 100644 --- a/tests/test_orm.py +++ b/tests/test_orm.py @@ -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))