Skip to content

fix test_message_serializer.py #1061

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

Merged
merged 3 commits into from
Mar 15, 2021
Merged

fix test_message_serializer.py #1061

merged 3 commits into from
Mar 15, 2021

Conversation

mhowlett
Copy link
Contributor

this should fix the travis failure on linux/2.7. given this is the old avro client which is going to be depreciated, i think this hack solution is good enough.

review this only after travis is green. if travis is not green, i will fix

@@ -23,7 +23,9 @@
import struct

import unittest
from unittest.mock import patch

if sys.version >= 3.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to import sys

@@ -76,7 +78,10 @@ def test_encode_record_with_schema(self):
message = self.ms.encode_record_with_schema(topic, basic, record)
self.assertMessageIsSame(message, record, schema_id)

def test_encode_record_with_schema_sets_writers_cache_once(self):
def test_encode_r ecord_with_schema_sets_writers_cache_once(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MIND THE GAP

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the note specifying not to review this yet was evidently well founded... thanks for the feedback though useful.

def test_encode_r ecord_with_schema_sets_writers_cache_once(self):
if sys.version < 3.0
# unittest.mock.patch not available
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a @pytest.skipif()... function attribute

@edenhill edenhill merged commit 1fa9c1f into confluentinc:master Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy