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

refact: fix warnings in pytest output #297

Merged
merged 1 commit into from Aug 31, 2020
Merged

Conversation

oakbani
Copy link
Contributor

@oakbani oakbani commented Aug 27, 2020

Summary

  • Renames TestEventDispatcher class so that pytest doesn't mistake it for a test class.
  • Replace SimpleLogger from event tag utils test since it's been deprecated.

Warnings

tests/test_event_processor.py:49
  /home/oakbani/Documents/Optimizely/python-sdk/tests/test_event_processor.py:49: PytestCollectionWarning: cannot collect test class 'TestEventDispatcher' because it has a __init__ constructor (from: tests/test_event_processor.py)
    class TestEventDispatcher(object):

tests/test_event_processor.py:498
  /home/oakbani/Documents/Optimizely/python-sdk/tests/test_event_processor.py:498: PytestCollectionWarning: cannot collect test class 'TestForwardingEventDispatcher' because it has a __init__ constructor (from: tests/test_event_processor.py)
    class TestForwardingEventDispatcher(object):


tests/helpers_tests/test_event_tag_utils.py::EventTagUtilsTest::test_get_numeric_metric__value_tag
tests/helpers_tests/test_event_tag_utils.py::EventTagUtilsTest::test_get_numeric_metric__value_tag
tests/helpers_tests/test_event_tag_utils.py::EventTagUtilsTest::test_get_numeric_metric__value_tag
tests/helpers_tests/test_event_tag_utils.py::EventTagUtilsTest::test_get_numeric_metric__value_tag
tests/helpers_tests/test_event_tag_utils.py::EventTagUtilsTest::test_get_numeric_metric__value_tag
tests/helpers_tests/test_event_tag_utils.py::EventTagUtilsTest::test_get_numeric_metric__value_tag
  /home/oakbani/Documents/Optimizely/python-sdk/optimizely/logger.py:83: DeprecationWarning: <class 'optimizely.logger.SimpleLogger'> is deprecated. Please use standard python loggers.
    warnings.warn(warning, DeprecationWarning)

Test plan

All tests should continue to pass

Issues

@oakbani oakbani requested a review from a team as a code owner August 27, 2020 15:08
@oakbani oakbani removed their assignment Aug 27, 2020
@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.154% when pulling 2aef427 on oakbani/remove-warnings into ce0827d on master.

@aliabbasrizvi aliabbasrizvi merged commit 9a455f6 into master Aug 31, 2020
@aliabbasrizvi aliabbasrizvi deleted the oakbani/remove-warnings branch August 31, 2020 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants