Skip to content

Commit

Permalink
Rename base test assertion methods for consistency (open-telemetry#2084)
Browse files Browse the repository at this point in the history
* Rename base test assertion methods for consistency

* Renamed assertion method

* Updated contrib SHA

* Updated contrib SHA
  • Loading branch information
owais committed Aug 30, 2021
1 parent 04f74ee commit b4ebef9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
# Otherwise, set variable to the commit of your branch on
# opentelemetry-python-contrib which is compatible with these Core repo
# changes.
CONTRIB_REPO_SHA: 3ad534cbba41c2b92618f5f03c4c92cee4a72df6
CONTRIB_REPO_SHA: 2a92e255f7595024242e45c0050c8f3de7140b6b

jobs:
build:
Expand Down
6 changes: 4 additions & 2 deletions tests/util/src/opentelemetry/test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@


class TestBase(unittest.TestCase):
# pylint: disable=C0103

@classmethod
def setUpClass(cls):
cls.original_tracer_provider = trace_api.get_tracer_provider()
Expand All @@ -44,11 +46,11 @@ def tearDownClass(cls):
def setUp(self):
self.memory_exporter.clear()

def check_span_instrumentation_info(self, span, module):
def assertEqualSpanInstrumentationInfo(self, span, module):
self.assertEqual(span.instrumentation_info.name, module.__name__)
self.assertEqual(span.instrumentation_info.version, module.__version__)

def assert_span_has_attributes(self, span, attributes):
def assertSpanHasAttributes(self, span, attributes):
for key, val in attributes.items():
self.assertIn(key, span.attributes)
self.assertEqual(val, span.attributes[key])
Expand Down

0 comments on commit b4ebef9

Please sign in to comment.