algorithmiaio/algorithmia-python

test flow issue

Closed this issue · 0 comments

zeryx commented

I've added a github actions for this repo in evaluation, all seems well however this path here seems to fail consistently with the following error:

self = <Test.algo_test.AlgoTest testMethod=test_json_unicode>

    def test_json_unicode(self):
        telephone = [u"\u260E"]
    
        #Unicode input to pipe()
        result1 = self.client.algo('util/Echo').pipe(telephone)
>       self.assertEquals('json', result1.metadata.content_type)
E       AssertionError: 'json' != 'text'
E       - json
E       + text

Test/algo_test.py:37: AssertionError

This occurs in both python 2.7, and python 3.6

def test_json_unicode(self):
telephone = [u"\u260E"]
#Unicode input to pipe()
result1 = self.client.algo('util/Echo').pipe(telephone)
self.assertEquals('json', result1.metadata.content_type)
self.assertEquals(telephone, result1.result)
#Unicode return in .result
result2 = self.client.algo('util/Echo').pipe(result1.result)
self.assertEquals('json', result2.metadata.content_type)
self.assertEquals(telephone, result2.result)