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

tests fails in sample apps on python 3.3 #873

Closed
ghost opened this issue Sep 26, 2013 · 3 comments
Closed

tests fails in sample apps on python 3.3 #873

ghost opened this issue Sep 26, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 26, 2013

In the various tutorials test functions, the returned data is always accessed as if it was a str. In python 3.3, the results are binary, so they must be decoded:

Instead of:
assert "Some string" in rv.data
use:
assert "Some string" in rv.data.decode('utf-8')

(there are other ways too - encode the string constant, etc.).

@mitsuhiko
Copy link
Contributor

Works for me. Given the age of the ticket someone might have fixed this already.

@cam-stitt
Copy link

I have been having this same issue today. Here is the error I am receiving.

nose.proxy.TypeError: Type str doesn't support the buffer API

@untitaker
Copy link
Contributor

Please post a full traceback. I believe though that you have a completely different issue than described here.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants